Google
  Web www.spinics.net

Re: zr36067 no longer loads automatically (regression)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


> Hi Mauro,
> 
> This commit of yours:
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=60b4bde48b36c0315ef41fd38c339b9c7e68c46f
> causes the zr36067 driver to no longer load automatically on systems
> with a Zoran-based adapter. The comment says that zr36067_pci_tbl was
> unused but this isn't true when the zr36067 driver is built as a module
> (which is almost always the case.) zr36067_pci_tbl is used to generate
> the modprobe alias which lets udev load the zr36067 driver.
Hmm... I've forgot about udev. Anyway, just reverting it won't work fine, since, when compiled in-kernel, it generates warnings and adds a code that won't be used anywere.

It seems that the proper fix is the enclosed patch. Could you test it please?

---
zoran: Re-adds udev entry removed by changeset 60b4bde48b36c0315ef41fd38c339b9c7e68c46f

Changeset 60b4bde48b36c0315ef41fd38c339b9c7e68c46f removed an unused struct on
zoran driver, when compiled with "Y". However, as pointed by Jean Delvare <khali@xxxxxxxxxxxx>,
this is neeeded when the driver is compiled as a module, since udev relies on it to 
auto-load the module.

Signed-off-by: Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>

diff --git a/drivers/media/video/zoran/zoran_card.c b/drivers/media/video/zoran/zoran_card.c
index 05f3919..0a50700 100644
--- a/drivers/media/video/zoran/zoran_card.c
+++ b/drivers/media/video/zoran/zoran_card.c
@@ -153,6 +153,14 @@ MODULE_DESCRIPTION("Zoran-36057/36067 JPEG codec driver");
 MODULE_AUTHOR("Serguei Miridonov");
 MODULE_LICENSE("GPL");
 
+#if (defined(CONFIG_USB_ZR364XX_MODULE) && defined(MODULE))
+static struct pci_device_id zr36067_pci_tbl[] = {
+	{PCI_VENDOR_ID_ZORAN, PCI_DEVICE_ID_ZORAN_36057,
+	 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+	{0}
+};
+MODULE_DEVICE_TABLE(pci, zr36067_pci_tbl);
+#endif
 
 int zoran_num;			/* number of Buzs in use */
 struct zoran *zoran[BUZ_MAX];


-- 

Cheers,
Mauro

_______________________________________________
v4l-dvb-maintainer mailing list
v4l-dvb-maintainer@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/v4l-dvb-maintainer

[Linux Media]     [Older V4L]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [SSH]     [Linux USB]

-->
Add to Google Powered by Linux

Google PageRank Checking tool