summaryrefslogtreecommitdiff
path: root/drivers/media/video/bttv-gpio.c
diff options
context:
space:
mode:
authorRussell King <rmk@arm.linux.org.uk>2006-01-06 11:42:03 (GMT)
committerGreg Kroah-Hartman <gregkh@suse.de>2006-01-13 19:26:11 (GMT)
commit348290a4ae143a692124330942b464ccdb0d0365 (patch)
tree1fae9909d4d4519c9548b5940be2dca7e31935c2 /drivers/media/video/bttv-gpio.c
parentd78967fb035aeb839a047ae69ce5f1ff39288a8d (diff)
downloadlinux-348290a4ae143a692124330942b464ccdb0d0365.tar.xz
[PATCH] Add bttv sub bus_type probe and remove methods
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/media/video/bttv-gpio.c')
-rw-r--r--drivers/media/video/bttv-gpio.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/drivers/media/video/bttv-gpio.c b/drivers/media/video/bttv-gpio.c
index d64accc..c4d5e2b 100644
--- a/drivers/media/video/bttv-gpio.c
+++ b/drivers/media/video/bttv-gpio.c
@@ -47,9 +47,29 @@ static int bttv_sub_bus_match(struct device *dev, struct device_driver *drv)
return 0;
}
+static int bttv_sub_probe(struct device *dev)
+{
+ struct bttv_sub_device *sdev = to_bttv_sub_dev(dev);
+ struct bttv_sub_driver *sub = to_bttv_sub_drv(dev->driver);
+
+ return sub->probe ? sub->probe(sdev) : -ENODEV;
+}
+
+static int bttv_sub_remove(struct device *dev)
+{
+ struct bttv_sub_device *sdev = to_bttv_sub_dev(dev);
+ struct bttv_sub_driver *sub = to_bttv_sub_drv(dev->driver);
+
+ if (sub->remove)
+ sub->remove(sdev);
+ return 0;
+}
+
struct bus_type bttv_sub_bus_type = {
- .name = "bttv-sub",
- .match = &bttv_sub_bus_match,
+ .name = "bttv-sub",
+ .match = &bttv_sub_bus_match,
+ .probe = bttv_sub_probe,
+ .remove = bttv_sub_remove,
};
EXPORT_SYMBOL(bttv_sub_bus_type);