summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/bt8xx/bttv-driver.c
diff options
context:
space:
mode:
authorJarod Wilson <jwilson@redhat.com>2007-03-24 15:23:50 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-04-27 15:45:14 -0300
commitf992a497c71981e215b1415759fc13593ed2919f (patch)
tree7bcf199c6c004f592ce85518eacf32ed4cfbacc5 /drivers/media/video/bt8xx/bttv-driver.c
parentfbc8408a0d9deeba8926e041db0bb1ef7f1b2cd6 (diff)
downloadtalos-op-linux-f992a497c71981e215b1415759fc13593ed2919f.tar.gz
talos-op-linux-f992a497c71981e215b1415759fc13593ed2919f.zip
V4L/DVB (5482): Bttv: automatically load dvb-bt8xx for bttv cards with dvb
This patch causes the bttv driver to automatically load the dvb-bt8xx module for bttv/dvb hybrid cards. Successfully tested with a pcHDTV HD-2000 card. This patch is based on the recent patches to enable autoloading of cx88-dvb, cx88-blackbird and saa7134-dvb. Signed-off-by: Jarod Wilson <jwilson@redhat.com> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/bt8xx/bttv-driver.c')
-rw-r--r--drivers/media/video/bt8xx/bttv-driver.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c
index 5720b77ac9a7..1c38723d3169 100644
--- a/drivers/media/video/bt8xx/bttv-driver.c
+++ b/drivers/media/video/bt8xx/bttv-driver.c
@@ -164,6 +164,24 @@ static ssize_t show_card(struct class_device *cd, char *buf)
static CLASS_DEVICE_ATTR(card, S_IRUGO, show_card, NULL);
/* ----------------------------------------------------------------------- */
+/* dvb auto-load setup */
+#if defined(CONFIG_MODULES) && defined(MODULE)
+static void request_module_async(struct work_struct *work)
+{
+ request_module("dvb-bt8xx");
+}
+
+static void request_modules(struct bttv *dev)
+{
+ INIT_WORK(&dev->request_module_wk, request_module_async);
+ schedule_work(&dev->request_module_wk);
+}
+#else
+#define request_modules(dev)
+#endif /* CONFIG_MODULES */
+
+
+/* ----------------------------------------------------------------------- */
/* static data */
/* special timing tables from conexant... */
@@ -4769,9 +4787,11 @@ static int __devinit bttv_probe(struct pci_dev *dev,
disclaim_video_lines(btv);
}
- /* add subdevices */
- if (bttv_tvcards[btv->c.type].has_dvb)
+ /* add subdevices and autoload dvb-bt8xx if needed */
+ if (bttv_tvcards[btv->c.type].has_dvb) {
bttv_sub_add_device(&btv->c, "dvb");
+ request_modules(btv);
+ }
bttv_input_init(btv);
OpenPOWER on IntegriCloud