aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2008-06-14 17:27:18 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-07-20 06:21:19 -0400
commit73104fb3e4e692cb1f9505b548ab073b0859b256 (patch)
treea6e26bb340edd5518b4d8ca2eee97cf0b9333de3 /drivers/media/dvb
parent494d24c527e5ab43aecb8e77bfdc7e939466b134 (diff)
V4L/DVB (8279): sms1xxx: #define usb vid:pid's
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r--drivers/media/dvb/siano/smsusb.c27
1 files changed, 20 insertions, 7 deletions
diff --git a/drivers/media/dvb/siano/smsusb.c b/drivers/media/dvb/siano/smsusb.c
index 02528f12ecf0..ca9bb36544c0 100644
--- a/drivers/media/dvb/siano/smsusb.c
+++ b/drivers/media/dvb/siano/smsusb.c
@@ -32,6 +32,14 @@
32#define MAX_BUFFERS 50 32#define MAX_BUFFERS 50
33#define MAX_URBS 10 33#define MAX_URBS 10
34 34
35/* TO DO: move these to a header file */
36#define USB_VID_SIANO 0x187f
37
38#define USB_PID_STELLAR 0x0100
39#define USB_PID_NOVA_A 0x0200
40#define USB_PID_NOVA_B 0x0201
41#define USB_PID_VEGA 0x0300
42
35typedef struct _smsusb_device smsusb_device_t; 43typedef struct _smsusb_device smsusb_device_t;
36 44
37typedef struct _smsusb_urb 45typedef struct _smsusb_urb
@@ -302,7 +310,8 @@ int smsusb_init_device(struct usb_interface *intf)
302 dev->udev = interface_to_usbdev(intf); 310 dev->udev = interface_to_usbdev(intf);
303 311
304 switch (dev->udev->descriptor.idProduct) { 312 switch (dev->udev->descriptor.idProduct) {
305 case 0x100: 313
314 case USB_PID_STELLAR:
306 dev->buffer_size = USB1_BUFFER_SIZE; 315 dev->buffer_size = USB1_BUFFER_SIZE;
307 316
308 params.setmode_handler = smsusb1_setmode; 317 params.setmode_handler = smsusb1_setmode;
@@ -311,13 +320,17 @@ int smsusb_init_device(struct usb_interface *intf)
311 printk(KERN_INFO "%s stellar device found\n", __func__ ); 320 printk(KERN_INFO "%s stellar device found\n", __func__ );
312 break; 321 break;
313 default: 322 default:
314 if (dev->udev->descriptor.idProduct == 0x200) { 323 switch (dev->udev->descriptor.idProduct) {
324 case USB_PID_NOVA_A:
315 params.device_type = SMS_NOVA_A0; 325 params.device_type = SMS_NOVA_A0;
316 printk(KERN_INFO "%s nova A0 found\n", __func__ ); 326 printk(KERN_INFO "%s nova A0 found\n", __func__ );
317 } else if (dev->udev->descriptor.idProduct == 0x201) { 327 break;
328 default:
329 case USB_PID_NOVA_B:
318 params.device_type = SMS_NOVA_B0; 330 params.device_type = SMS_NOVA_B0;
319 printk(KERN_INFO "%s nova B0 found\n", __func__); 331 printk(KERN_INFO "%s nova B0 found\n", __func__);
320 } else { 332 break;
333 case USB_PID_VEGA:
321 params.device_type = SMS_VEGA; 334 params.device_type = SMS_VEGA;
322 printk(KERN_INFO "%s Vega found\n", __func__); 335 printk(KERN_INFO "%s Vega found\n", __func__);
323 } 336 }
@@ -421,9 +434,9 @@ void smsusb_disconnect(struct usb_interface *intf)
421} 434}
422 435
423static struct usb_device_id smsusb_id_table [] = { 436static struct usb_device_id smsusb_id_table [] = {
424 { USB_DEVICE(0x187F, 0x0010) }, 437 { USB_DEVICE(USB_VID_SIANO, 0x0010) },
425 { USB_DEVICE(0x187F, 0x0100) }, 438 { USB_DEVICE(USB_VID_SIANO, USB_PID_STELLAR) },
426 { USB_DEVICE(0x187F, 0x0200) }, 439 { USB_DEVICE(USB_VID_SIANO, USB_PID_NOVA_A) },
427 { } /* Terminating entry */ 440 { } /* Terminating entry */
428}; 441};
429MODULE_DEVICE_TABLE (usb, smsusb_id_table); 442MODULE_DEVICE_TABLE (usb, smsusb_id_table);