Em Sat, 19 Sep 2009 12:49:39 +0200 (CEST)
Patrick Boettcher <pboettc...@kernellabs.com> escreveu:

> On Fri, 18 Sep 2009, Edward Sheldrake wrote:
> 
> > With latest hg (12994), my "Leadtek Winfast DTV Dongle (STK7700P based)" 
> > (0413:6f01) gets detected as a "Terratec Cinergy T USB XXS (HD)".
> >
> > I think "&dib0700_usb_id_table[34]" (the leadtek) got moved by mistake, but 
> > "&dib0700_usb_id_table[33]" (a terratec) should have been moved instead (in 
> > changeset 12889).
> >
> > hg 12889: http://linuxtv.org/hg/v4l-dvb/rev/cec94ceb4f54
> 
> Argl!
> 
> Very well spotted.
> 
> Can you please check if this patch fixes it correctly?
> 
> http://www.kernellabs.com/hg/~pboettcher/v4l-dvb/

Having those magic numbers is not nice, since, when conflicts arrive, we may do
bad things. I think we should really consider a better way to associate both 
tables.

if we use the way several V4L drivers do, a code like this would look like:


#define LEADTEK_WINFAST_STK7700P        34
...
        [LEADTEK_WINFAST_STK7700P] = { USB_DEVICE(USB_VID_LEADTEK,   
USB_PID_WINFAST_DTV_DONGLE_STK7700P_2) },
...

        {   "Leadtek Winfast DTV Dongle (STK7700P based)",
                { &dib0700_usb_id_table[8], 
&dib0700_usb_id_table[LEADTEK_WINFAST_STK7700P] },
                { NULL },
        },
...

The above code won't generate any extra code. The only drawback is the need of 
typing more.

Cheers,
Mauro
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to