tuner initialization in 2.4.0-test1-ac1[0-8]

From: Arnd Bergmann (arnd@uni.de)
Date: Tue Jun 13 2000 - 17:27:48 EST


Hi!

I noticed that the tuner is getting initialized twice in the
recent kernels (now that it is working again) when compiled
into the kernel.

Besides the call through the module_init(), it is started
through

partition_setup() [ fs/partitions/check.c ]
=> device_init() [ drivers/block/genhd.c ]
=> chr_device_init() [ drivers/char/mem.c ]
=> videodev_init() [ drivers/char/videodev.c]
=> tuner_init_module()[ drivers/char/tuner.c ]

Why the heck should the tuner get initialized through
a function called partition_setup() ???

Just removing the call solves this particular problem
(see below), but the thinko is probably still there
in other drivers.

For example in i2c-old.c, both tuner_init_module()
and msp3400_init_module() are called as well,
but I could not verify this as an error, since
I don't use it.

Arnd Bergmann <><

--- videodev.c.bak Tue Jun 13 22:32:56 2000
+++ videodev.c Tue Jun 13 23:38:33 2000
@@ -62,9 +62,6 @@
 #endif /* CONFIG_PROC_FS && CONFIG_VIDEO_PROC_FS */

-#ifdef CONFIG_VIDEO_BT848
-extern int tuner_init_module(struct video_init *);
-#endif
 #ifdef CONFIG_VIDEO_BWQCAM
 extern int init_bw_qcams(struct video_init *);
 #endif
@@ -79,9 +76,6 @@
 #endif

 static struct video_init video_init_list[]={
-#ifdef CONFIG_VIDEO_BT848
- {"i2c-tuner", tuner_init_module},
-#endif
 #ifdef CONFIG_VIDEO_BWQCAM
        {"bw-qcam", init_bw_qcams},
 #endif

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Jun 15 2000 - 21:00:30 EST