USB: serial: constify device-id tables
authorJohan Hovold <jhovold@gmail.com>
Sun, 29 Dec 2013 18:22:54 +0000 (19:22 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Jan 2014 20:31:46 +0000 (12:31 -0800)
Declare device-id tables as const where possible.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/ftdi_sio.c
drivers/usb/serial/ipaq.c
drivers/usb/serial/metro-usb.c
drivers/usb/serial/qcaux.c
drivers/usb/serial/safe_serial.c
drivers/usb/serial/ti_usb_3410_5052.c
drivers/usb/serial/visor.c

index fb0d537435eb221019babe694aafefd25b9e90cc..2e5cf73f121747d92f52d0b5c2703d6aa2e6e7e4 100644 (file)
@@ -145,7 +145,7 @@ static struct ftdi_sio_quirk ftdi_8u2232c_quirk = {
  * Device ID not listed? Test it using
  * /sys/bus/usb-serial/drivers/ftdi_sio/new_id and send a patch or report.
  */
-static struct usb_device_id id_table_combined [] = {
+static const struct usb_device_id id_table_combined[] = {
        { USB_DEVICE(FTDI_VID, FTDI_ZEITCONTROL_TAGTRACE_MIFARE_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_CTI_MINI_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_CTI_NANO_PID) },
index 76c9a847da5dd0b3c0e9c7b2e435b897e20f2ed7..3754bc30406e57284a08a09705cd72850503be89 100644 (file)
@@ -37,7 +37,7 @@ static int  ipaq_open(struct tty_struct *tty,
 static int  ipaq_calc_num_ports(struct usb_serial *serial);
 static int  ipaq_startup(struct usb_serial *serial);
 
-static struct usb_device_id ipaq_id_table [] = {
+static const struct usb_device_id ipaq_id_table[] = {
        { USB_DEVICE(0x0104, 0x00BE) }, /* Socket USB Sync */
        { USB_DEVICE(0x03F0, 0x1016) }, /* HP USB Sync */
        { USB_DEVICE(0x03F0, 0x1116) }, /* HP USB Sync 1611 */
index 2b648c41f4e792cbd15a77418192285d9f8341d0..6df2e44f05d8ce683e67d70c72ece9d7cc80e9dd 100644 (file)
@@ -43,7 +43,7 @@ struct metrousb_private {
 };
 
 /* Device table list. */
-static struct usb_device_id id_table[] = {
+static const struct usb_device_id id_table[] = {
        { USB_DEVICE(FOCUS_VENDOR_ID, FOCUS_PRODUCT_ID_BI) },
        { USB_DEVICE(FOCUS_VENDOR_ID, FOCUS_PRODUCT_ID_UNI) },
        { }, /* Terminating entry. */
index 31f81c3c15eb780a10eccaa3b937cebb9f713df3..0a5883f8576b2df2a1c2784ccdd29a1fd6bcb1e9 100644 (file)
@@ -54,7 +54,7 @@
 #define SAMSUNG_VENDOR_ID                      0x04e8
 #define SAMSUNG_PRODUCT_U520                   0x6640 /* SCH-U520 */
 
-static struct usb_device_id id_table[] = {
+static const struct usb_device_id id_table[] = {
        { USB_DEVICE_AND_INTERFACE_INFO(UTSTARCOM_VENDOR_ID, UTSTARCOM_PRODUCT_PC5740, 0xff, 0x00, 0x00) },
        { USB_DEVICE_AND_INTERFACE_INFO(UTSTARCOM_VENDOR_ID, UTSTARCOM_PRODUCT_PC5750, 0xff, 0x00, 0x00) },
        { USB_DEVICE_AND_INTERFACE_INFO(UTSTARCOM_VENDOR_ID, UTSTARCOM_PRODUCT_UM150, 0xff, 0x00, 0x00) },
index ba895989d8c4b89231cf34a431e7f894a5ab4268..d0e602af3ba5743cf72e681090f6b327c166dc94 100644 (file)
@@ -125,7 +125,7 @@ MODULE_PARM_DESC(padded, "Pad to full wMaxPacketSize On/Off");
        .bInterfaceClass = (ic), \
        .bInterfaceSubClass = (isc),
 
-static struct usb_device_id id_table[] = {
+static const struct usb_device_id id_table[] = {
        {MY_USB_DEVICE(0x49f, 0xffff, CDC_DEVICE_CLASS, LINEO_INTERFACE_CLASS, LINEO_INTERFACE_SUBCLASS_SAFESERIAL)},   /* Itsy */
        {MY_USB_DEVICE(0x3f0, 0x2101, CDC_DEVICE_CLASS, LINEO_INTERFACE_CLASS, LINEO_INTERFACE_SUBCLASS_SAFESERIAL)},   /* Calypso */
        {MY_USB_DEVICE(0x4dd, 0x8001, CDC_DEVICE_CLASS, LINEO_INTERFACE_CLASS, LINEO_INTERFACE_SUBCLASS_SAFESERIAL)},   /* Iris */
index c9a35697ebe9a6e131d5a9c145e5f3f3415dd5bf..87188095fa1963c273c162efba9a72fcfeb4336e 100644 (file)
@@ -143,7 +143,7 @@ static int ti_download_firmware(struct ti_device *tdev);
 static int closing_wait = TI_DEFAULT_CLOSING_WAIT;
 
 /* supported devices */
-static struct usb_device_id ti_id_table_3410[] = {
+static const struct usb_device_id ti_id_table_3410[] = {
        { USB_DEVICE(TI_VENDOR_ID, TI_3410_PRODUCT_ID) },
        { USB_DEVICE(TI_VENDOR_ID, TI_3410_EZ430_ID) },
        { USB_DEVICE(MTS_VENDOR_ID, MTS_GSM_NO_FW_PRODUCT_ID) },
@@ -163,7 +163,7 @@ static struct usb_device_id ti_id_table_3410[] = {
        { }     /* terminator */
 };
 
-static struct usb_device_id ti_id_table_5052[] = {
+static const struct usb_device_id ti_id_table_5052[] = {
        { USB_DEVICE(TI_VENDOR_ID, TI_5052_BOOT_PRODUCT_ID) },
        { USB_DEVICE(TI_VENDOR_ID, TI_5152_BOOT_PRODUCT_ID) },
        { USB_DEVICE(TI_VENDOR_ID, TI_5052_EEPROM_PRODUCT_ID) },
@@ -171,7 +171,7 @@ static struct usb_device_id ti_id_table_5052[] = {
        { }     /* terminator */
 };
 
-static struct usb_device_id ti_id_table_combined[] = {
+static const struct usb_device_id ti_id_table_combined[] = {
        { USB_DEVICE(TI_VENDOR_ID, TI_3410_PRODUCT_ID) },
        { USB_DEVICE(TI_VENDOR_ID, TI_3410_EZ430_ID) },
        { USB_DEVICE(MTS_VENDOR_ID, MTS_GSM_NO_FW_PRODUCT_ID) },
index 9910aa2edf4b1916c518e3f83d11e39ff94226a0..ae016439e2cd6d56f81788aca52fbbe3a33771fa 100644 (file)
@@ -51,7 +51,7 @@ static int palm_os_3_probe(struct usb_serial *serial,
 static int palm_os_4_probe(struct usb_serial *serial,
                                        const struct usb_device_id *id);
 
-static struct usb_device_id id_table [] = {
+static const struct usb_device_id id_table[] = {
        { USB_DEVICE(HANDSPRING_VENDOR_ID, HANDSPRING_VISOR_ID),
                .driver_info = (kernel_ulong_t)&palm_os_3_probe },
        { USB_DEVICE(HANDSPRING_VENDOR_ID, HANDSPRING_TREO_ID),
@@ -113,18 +113,18 @@ static struct usb_device_id id_table [] = {
        { }                                     /* Terminating entry */
 };
 
-static struct usb_device_id clie_id_5_table [] = {
+static const struct usb_device_id clie_id_5_table[] = {
        { USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_UX50_ID),
                .driver_info = (kernel_ulong_t)&palm_os_4_probe },
        { }                                     /* Terminating entry */
 };
 
-static struct usb_device_id clie_id_3_5_table [] = {
+static const struct usb_device_id clie_id_3_5_table[] = {
        { USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_3_5_ID) },
        { }                                     /* Terminating entry */
 };
 
-static struct usb_device_id id_table_combined [] = {
+static const struct usb_device_id id_table_combined[] = {
        { USB_DEVICE(HANDSPRING_VENDOR_ID, HANDSPRING_VISOR_ID) },
        { USB_DEVICE(HANDSPRING_VENDOR_ID, HANDSPRING_TREO_ID) },
        { USB_DEVICE(HANDSPRING_VENDOR_ID, HANDSPRING_TREO600_ID) },