Skip to contentSkip to conversation

Leadtek/Terratec usb id mixup in hg 12889

DISCUSSION Edward Sheldrake 3 participants 4 messages Sep 18, 2009 – Sep 20, 2009 Media (V4L/DVB)

lore
Share & tools
lore
#1 lore raw
Quoted 5 lines · Edward Sheldrake

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/

Thanks,
--

Patrick Boettcher - Kernel Labs
http://www.kernellabs.com/

#2 lore raw

Em Sat, 19 Sep 2009 12:49:39 +0200 (CEST) Patrick Boettcher <[email protected]> escreveu:

Quoted 8 lines · Edward Sheldrake
Quoted 6 lines

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

Quoted 7 lines

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