From patchwork Thu Jan 8 19:56:27 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 1411 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n08Jrpeu023286 for ; Thu, 8 Jan 2009 11:53:51 -0800 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762284AbZAHT5a (ORCPT ); Thu, 8 Jan 2009 14:57:30 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1762268AbZAHT5a (ORCPT ); Thu, 8 Jan 2009 14:57:30 -0500 Received: from mx2.redhat.com ([66.187.237.31]:50184 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1762129AbZAHT53 (ORCPT ); Thu, 8 Jan 2009 14:57:29 -0500 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n08JueRv021943; Thu, 8 Jan 2009 14:56:42 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n08JueVa025959; Thu, 8 Jan 2009 14:56:40 -0500 Received: from pedra.chehab.org (vpn-51-39.sfbay.redhat.com [10.14.51.39]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n08JuWDD009978; Thu, 8 Jan 2009 14:56:36 -0500 Date: Thu, 8 Jan 2009 17:56:27 -0200 From: Mauro Carvalho Chehab To: Jean Delvare Cc: V4L and DVB maintainers , Linux Media Mailing List Subject: Re: zr36067 no longer loads automatically (regression) Message-ID: <20090108175627.0ebd9f36@pedra.chehab.org> In-Reply-To: <20090108143315.2b564dfe@hyperion.delvare> References: <20090108143315.2b564dfe@hyperion.delvare> Organization: Red Hat Mime-Version: 1.0 X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org > 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 , 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 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];