Re: zr36067 no longer loads automatically (regression)

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

 



Hi Mauro,

On Thu, 8 Jan 2009 17:56:27 -0200, Mauro Carvalho Chehab wrote:
> > 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.

That's right, although I don't expect it to be a problem in practice:
who really builds media drivers into their kernels?

> 
> 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))

Huh? I guess you really mean: CONFIG_VIDEO_ZORAN_MODULE?

I don't get the point of checking for both CONFIG_VIDEO_ZORAN_MODULE
and MODULE, checking for just one of them should be enough, right?

> +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];
> 
> 


-- 
Jean Delvare
--
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