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
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux