V4L/DVB (10749): sms1xxx: move smsusb_id_table into smsusb.c
authorMichael Krufky <mkrufky@linuxtv.org>
Sun, 31 Aug 2008 20:03:15 +0000 (17:03 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 30 Mar 2009 15:43:00 +0000 (12:43 -0300)
Move the usb_device_id table to the smsusb module in preparation for the
sms1xxx module to be split into sub-modules. This will allow the smsusb
driver to start up automatically upon insertion of the USB device.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/siano/sms-cards.c
drivers/media/dvb/siano/sms-cards.h
drivers/media/dvb/siano/smsusb.c

index 6c8faeb74840f0ce9c202e94f01ada5d746302af..39f83faa226ed7d96d0e7987edf89f3938349a51 100644 (file)
 
 #include "sms-cards.h"
 
-struct usb_device_id smsusb_id_table[] = {
-#ifdef CONFIG_DVB_SIANO_SMS1XXX_SMS_IDS
-       { USB_DEVICE(0x187f, 0x0010),
-               .driver_info = SMS1XXX_BOARD_SIANO_STELLAR },
-       { USB_DEVICE(0x187f, 0x0100),
-               .driver_info = SMS1XXX_BOARD_SIANO_STELLAR },
-       { USB_DEVICE(0x187f, 0x0200),
-               .driver_info = SMS1XXX_BOARD_SIANO_NOVA_A },
-       { USB_DEVICE(0x187f, 0x0201),
-               .driver_info = SMS1XXX_BOARD_SIANO_NOVA_B },
-       { USB_DEVICE(0x187f, 0x0300),
-               .driver_info = SMS1XXX_BOARD_SIANO_VEGA },
-#endif
-       { USB_DEVICE(0x2040, 0x1700),
-               .driver_info = SMS1XXX_BOARD_HAUPPAUGE_CATAMOUNT },
-       { USB_DEVICE(0x2040, 0x1800),
-               .driver_info = SMS1XXX_BOARD_HAUPPAUGE_OKEMO_A },
-       { USB_DEVICE(0x2040, 0x1801),
-               .driver_info = SMS1XXX_BOARD_HAUPPAUGE_OKEMO_B },
-       { USB_DEVICE(0x2040, 0x2000),
-               .driver_info = SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD },
-       { USB_DEVICE(0x2040, 0x2009),
-               .driver_info = SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD_R2 },
-       { USB_DEVICE(0x2040, 0x200a),
-               .driver_info = SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD },
-       { USB_DEVICE(0x2040, 0x2010),
-               .driver_info = SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD },
-       { USB_DEVICE(0x2040, 0x2011),
-               .driver_info = SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD },
-       { USB_DEVICE(0x2040, 0x2019),
-               .driver_info = SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD },
-       { USB_DEVICE(0x2040, 0x5500),
-               .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
-       { USB_DEVICE(0x2040, 0x5510),
-               .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
-       { USB_DEVICE(0x2040, 0x5520),
-               .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
-       { USB_DEVICE(0x2040, 0x5530),
-               .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
-       { USB_DEVICE(0x2040, 0x5580),
-               .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
-       { USB_DEVICE(0x2040, 0x5590),
-               .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
-       { }             /* Terminating entry */
-};
-MODULE_DEVICE_TABLE(usb, smsusb_id_table);
-
 static struct sms_board sms_boards[] = {
        [SMS_BOARD_UNKNOWN] = {
                .name   = "Unknown board",
index fe292aaea4cc1e0f0406fe862244dc61ed431a96..8f539a2e5b9a6bbd63ac4d3f0b8ca6fc474daeaa 100644 (file)
@@ -54,6 +54,4 @@ int sms_board_led_feedback(struct smscore_device_t *coredev, int led);
 int sms_board_power(struct smscore_device_t *coredev, int onoff);
 int sms_board_lna_control(struct smscore_device_t *coredev, int onoff);
 
-extern struct usb_device_id smsusb_id_table[];
-
 #endif /* __SMS_CARDS_H__ */
index 0f3506ec1acc809a83e53976f375b0eddc7642f2..f8cfeaae5cc1aa18fde494c595d4b41e83e3e69e 100644 (file)
@@ -474,6 +474,53 @@ static int smsusb_resume(struct usb_interface *intf)
        return 0;
 }
 
+struct usb_device_id smsusb_id_table[] = {
+#ifdef CONFIG_DVB_SIANO_SMS1XXX_SMS_IDS
+       { USB_DEVICE(0x187f, 0x0010),
+               .driver_info = SMS1XXX_BOARD_SIANO_STELLAR },
+       { USB_DEVICE(0x187f, 0x0100),
+               .driver_info = SMS1XXX_BOARD_SIANO_STELLAR },
+       { USB_DEVICE(0x187f, 0x0200),
+               .driver_info = SMS1XXX_BOARD_SIANO_NOVA_A },
+       { USB_DEVICE(0x187f, 0x0201),
+               .driver_info = SMS1XXX_BOARD_SIANO_NOVA_B },
+       { USB_DEVICE(0x187f, 0x0300),
+               .driver_info = SMS1XXX_BOARD_SIANO_VEGA },
+#endif
+       { USB_DEVICE(0x2040, 0x1700),
+               .driver_info = SMS1XXX_BOARD_HAUPPAUGE_CATAMOUNT },
+       { USB_DEVICE(0x2040, 0x1800),
+               .driver_info = SMS1XXX_BOARD_HAUPPAUGE_OKEMO_A },
+       { USB_DEVICE(0x2040, 0x1801),
+               .driver_info = SMS1XXX_BOARD_HAUPPAUGE_OKEMO_B },
+       { USB_DEVICE(0x2040, 0x2000),
+               .driver_info = SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD },
+       { USB_DEVICE(0x2040, 0x2009),
+               .driver_info = SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD_R2 },
+       { USB_DEVICE(0x2040, 0x200a),
+               .driver_info = SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD },
+       { USB_DEVICE(0x2040, 0x2010),
+               .driver_info = SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD },
+       { USB_DEVICE(0x2040, 0x2011),
+               .driver_info = SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD },
+       { USB_DEVICE(0x2040, 0x2019),
+               .driver_info = SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD },
+       { USB_DEVICE(0x2040, 0x5500),
+               .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
+       { USB_DEVICE(0x2040, 0x5510),
+               .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
+       { USB_DEVICE(0x2040, 0x5520),
+               .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
+       { USB_DEVICE(0x2040, 0x5530),
+               .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
+       { USB_DEVICE(0x2040, 0x5580),
+               .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
+       { USB_DEVICE(0x2040, 0x5590),
+               .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
+       { }             /* Terminating entry */
+};
+MODULE_DEVICE_TABLE(usb, smsusb_id_table);
+
 static struct usb_driver smsusb_driver = {
        .name                   = "smsusb",
        .probe                  = smsusb_probe,