Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

USB serial: make USB device id constant

The id_table field of the struct usb_device_id is constant in <linux/usb.h>
so it is worth to make the initialization data also constant.

The semantic match that finds this kind of pattern is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r@
disable decl_init,const_decl_init;
identifier I1, I2, x;
@@
struct I1 {
...
const struct I2 *x;
...
};
@s@
identifier r.I1, y;
identifier r.x, E;
@@
struct I1 y = {
.x = E,
};
@c@
identifier r.I2;
identifier s.E;
@@
const struct I2 E[] = ... ;
@depends on !c@
identifier r.I2;
identifier s.E;
@@
+ const
struct I2 E[] = ...;
// </smpl>

Signed-off-by: Németh Márton <nm127@freemail.hu>
Cc: Julia Lawall <julia@diku.dk>
Cc: cocci@diku.dk
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by

Németh Márton and committed by
Greg Kroah-Hartman
7d40d7e8 6ef4852b

+60 -60
+1 -1
drivers/usb/serial/aircable.c
··· 78 78 #define DRIVER_DESC "AIRcable USB Driver" 79 79 80 80 /* ID table that will be registered with USB core */ 81 - static struct usb_device_id id_table [] = { 81 + static const struct usb_device_id id_table[] = { 82 82 { USB_DEVICE(AIRCABLE_VID, AIRCABLE_USB_PID) }, 83 83 { }, 84 84 };
+1 -1
drivers/usb/serial/ark3116.c
··· 50 50 /* usb timeout of 1 second */ 51 51 #define ARK_TIMEOUT (1*HZ) 52 52 53 - static struct usb_device_id id_table [] = { 53 + static const struct usb_device_id id_table[] = { 54 54 { USB_DEVICE(0x6547, 0x0232) }, 55 55 { USB_DEVICE(0x18ec, 0x3118) }, /* USB to IrDA adapter */ 56 56 { },
+1 -1
drivers/usb/serial/belkin_sa.c
··· 103 103 unsigned int set, unsigned int clear); 104 104 105 105 106 - static struct usb_device_id id_table_combined [] = { 106 + static const struct usb_device_id id_table_combined[] = { 107 107 { USB_DEVICE(BELKIN_SA_VID, BELKIN_SA_PID) }, 108 108 { USB_DEVICE(BELKIN_OLD_VID, BELKIN_OLD_PID) }, 109 109 { USB_DEVICE(PERACOM_VID, PERACOM_PID) },
+1 -1
drivers/usb/serial/ch341.c
··· 71 71 72 72 static int debug; 73 73 74 - static struct usb_device_id id_table [] = { 74 + static const struct usb_device_id id_table[] = { 75 75 { USB_DEVICE(0x4348, 0x5523) }, 76 76 { USB_DEVICE(0x1a86, 0x7523) }, 77 77 { },
+1 -1
drivers/usb/serial/cp210x.c
··· 55 55 56 56 static int debug; 57 57 58 - static struct usb_device_id id_table [] = { 58 + static const struct usb_device_id id_table[] = { 59 59 { USB_DEVICE(0x0471, 0x066A) }, /* AKTAKOM ACE-1001 cable */ 60 60 { USB_DEVICE(0x0489, 0xE000) }, /* Pirelli Broadband S.p.A, DP-L10 SIP/GSM Mobile */ 61 61 { USB_DEVICE(0x0745, 0x1000) }, /* CipherLab USB CCD Barcode Scanner 1000 */
+1 -1
drivers/usb/serial/cyberjack.c
··· 70 70 static void cyberjack_read_bulk_callback(struct urb *urb); 71 71 static void cyberjack_write_bulk_callback(struct urb *urb); 72 72 73 - static struct usb_device_id id_table [] = { 73 + static const struct usb_device_id id_table[] = { 74 74 { USB_DEVICE(CYBERJACK_VENDOR_ID, CYBERJACK_PRODUCT_ID) }, 75 75 { } /* Terminating entry */ 76 76 };
+4 -4
drivers/usb/serial/cypress_m8.c
··· 87 87 #define CYPRESS_BUF_SIZE 1024 88 88 #define CYPRESS_CLOSING_WAIT (30*HZ) 89 89 90 - static struct usb_device_id id_table_earthmate [] = { 90 + static const struct usb_device_id id_table_earthmate[] = { 91 91 { USB_DEVICE(VENDOR_ID_DELORME, PRODUCT_ID_EARTHMATEUSB) }, 92 92 { USB_DEVICE(VENDOR_ID_DELORME, PRODUCT_ID_EARTHMATEUSB_LT20) }, 93 93 { } /* Terminating entry */ 94 94 }; 95 95 96 - static struct usb_device_id id_table_cyphidcomrs232 [] = { 96 + static const struct usb_device_id id_table_cyphidcomrs232[] = { 97 97 { USB_DEVICE(VENDOR_ID_CYPRESS, PRODUCT_ID_CYPHIDCOM) }, 98 98 { USB_DEVICE(VENDOR_ID_POWERCOM, PRODUCT_ID_UPS) }, 99 99 { } /* Terminating entry */ 100 100 }; 101 101 102 - static struct usb_device_id id_table_nokiaca42v2 [] = { 102 + static const struct usb_device_id id_table_nokiaca42v2[] = { 103 103 { USB_DEVICE(VENDOR_ID_DAZZLE, PRODUCT_ID_CA42) }, 104 104 { } /* Terminating entry */ 105 105 }; 106 106 107 - static struct usb_device_id id_table_combined [] = { 107 + static const struct usb_device_id id_table_combined[] = { 108 108 { USB_DEVICE(VENDOR_ID_DELORME, PRODUCT_ID_EARTHMATEUSB) }, 109 109 { USB_DEVICE(VENDOR_ID_DELORME, PRODUCT_ID_EARTHMATEUSB_LT20) }, 110 110 { USB_DEVICE(VENDOR_ID_CYPRESS, PRODUCT_ID_CYPHIDCOM) },
+3 -3
drivers/usb/serial/digi_acceleport.c
··· 470 470 471 471 static int debug; 472 472 473 - static struct usb_device_id id_table_combined [] = { 473 + static const struct usb_device_id id_table_combined[] = { 474 474 { USB_DEVICE(DIGI_VENDOR_ID, DIGI_2_ID) }, 475 475 { USB_DEVICE(DIGI_VENDOR_ID, DIGI_4_ID) }, 476 476 { } /* Terminating entry */ 477 477 }; 478 478 479 - static struct usb_device_id id_table_2 [] = { 479 + static const struct usb_device_id id_table_2[] = { 480 480 { USB_DEVICE(DIGI_VENDOR_ID, DIGI_2_ID) }, 481 481 { } /* Terminating entry */ 482 482 }; 483 483 484 - static struct usb_device_id id_table_4 [] = { 484 + static const struct usb_device_id id_table_4[] = { 485 485 { USB_DEVICE(DIGI_VENDOR_ID, DIGI_4_ID) }, 486 486 { } /* Terminating entry */ 487 487 };
+1 -1
drivers/usb/serial/empeg.c
··· 93 93 static void empeg_write_bulk_callback(struct urb *urb); 94 94 static void empeg_read_bulk_callback(struct urb *urb); 95 95 96 - static struct usb_device_id id_table [] = { 96 + static const struct usb_device_id id_table[] = { 97 97 { USB_DEVICE(EMPEG_VENDOR_ID, EMPEG_PRODUCT_ID) }, 98 98 { } /* Terminating entry */ 99 99 };
+1 -1
drivers/usb/serial/funsoft.c
··· 18 18 19 19 static int debug; 20 20 21 - static struct usb_device_id id_table [] = { 21 + static const struct usb_device_id id_table[] = { 22 22 { USB_DEVICE(0x1404, 0xcddc) }, 23 23 { }, 24 24 };
+1 -1
drivers/usb/serial/garmin_gps.c
··· 210 210 211 211 212 212 213 - static struct usb_device_id id_table [] = { 213 + static const struct usb_device_id id_table[] = { 214 214 /* the same device id seems to be used by all 215 215 usb enabled GPS devices */ 216 216 { USB_DEVICE(GARMIN_VENDOR_ID, 3) },
+1 -1
drivers/usb/serial/generic.c
··· 41 41 42 42 /* we want to look at all devices, as the vendor/product id can change 43 43 * depending on the command line argument */ 44 - static struct usb_device_id generic_serial_ids[] = { 44 + static const struct usb_device_id generic_serial_ids[] = { 45 45 {.driver_info = 42}, 46 46 {} 47 47 };
+1 -1
drivers/usb/serial/hp4x.c
··· 29 29 #define HP_VENDOR_ID 0x03f0 30 30 #define HP49GP_PRODUCT_ID 0x0121 31 31 32 - static struct usb_device_id id_table [] = { 32 + static const struct usb_device_id id_table[] = { 33 33 { USB_DEVICE(HP_VENDOR_ID, HP49GP_PRODUCT_ID) }, 34 34 { } /* Terminating entry */ 35 35 };
+5 -5
drivers/usb/serial/io_tables.h
··· 14 14 #ifndef IO_TABLES_H 15 15 #define IO_TABLES_H 16 16 17 - static struct usb_device_id edgeport_2port_id_table [] = { 17 + static const struct usb_device_id edgeport_2port_id_table[] = { 18 18 { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_2) }, 19 19 { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_2I) }, 20 20 { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_421) }, ··· 23 23 { } 24 24 }; 25 25 26 - static struct usb_device_id edgeport_4port_id_table [] = { 26 + static const struct usb_device_id edgeport_4port_id_table[] = { 27 27 { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_4) }, 28 28 { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_RAPIDPORT_4) }, 29 29 { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_4T) }, ··· 37 37 { } 38 38 }; 39 39 40 - static struct usb_device_id edgeport_8port_id_table [] = { 40 + static const struct usb_device_id edgeport_8port_id_table[] = { 41 41 { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8) }, 42 42 { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_16_DUAL_CPU) }, 43 43 { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8I) }, ··· 47 47 { } 48 48 }; 49 49 50 - static struct usb_device_id Epic_port_id_table [] = { 50 + static const struct usb_device_id Epic_port_id_table[] = { 51 51 { USB_DEVICE(USB_VENDOR_ID_NCR, NCR_DEVICE_ID_EPIC_0202) }, 52 52 { USB_DEVICE(USB_VENDOR_ID_NCR, NCR_DEVICE_ID_EPIC_0203) }, 53 53 { USB_DEVICE(USB_VENDOR_ID_NCR, NCR_DEVICE_ID_EPIC_0310) }, ··· 60 60 }; 61 61 62 62 /* Devices that this driver supports */ 63 - static struct usb_device_id id_table_combined [] = { 63 + static const struct usb_device_id id_table_combined[] = { 64 64 { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_4) }, 65 65 { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_RAPIDPORT_4) }, 66 66 { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_4T) },
+3 -3
drivers/usb/serial/io_ti.c
··· 134 134 135 135 136 136 /* Devices that this driver supports */ 137 - static struct usb_device_id edgeport_1port_id_table [] = { 137 + static const struct usb_device_id edgeport_1port_id_table[] = { 138 138 { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_1) }, 139 139 { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_TI3410_EDGEPORT_1) }, 140 140 { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_TI3410_EDGEPORT_1I) }, ··· 154 154 { } 155 155 }; 156 156 157 - static struct usb_device_id edgeport_2port_id_table [] = { 157 + static const struct usb_device_id edgeport_2port_id_table[] = { 158 158 { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_2) }, 159 159 { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_2C) }, 160 160 { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_2I) }, ··· 177 177 }; 178 178 179 179 /* Devices that this driver supports */ 180 - static struct usb_device_id id_table_combined [] = { 180 + static const struct usb_device_id id_table_combined[] = { 181 181 { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_1) }, 182 182 { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_TI3410_EDGEPORT_1) }, 183 183 { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_TI3410_EDGEPORT_1I) },
+1 -1
drivers/usb/serial/ipw.c
··· 134 134 135 135 #define IPW_WANTS_TO_SEND 0x30 136 136 137 - static struct usb_device_id usb_ipw_ids[] = { 137 + static const struct usb_device_id usb_ipw_ids[] = { 138 138 { USB_DEVICE(IPW_VID, IPW_PID) }, 139 139 { }, 140 140 };
+1 -1
drivers/usb/serial/ir-usb.c
··· 100 100 static u8 ir_xbof; 101 101 static u8 ir_add_bof; 102 102 103 - static struct usb_device_id ir_id_table[] = { 103 + static const struct usb_device_id ir_id_table[] = { 104 104 { USB_DEVICE(0x050f, 0x0180) }, /* KC Technology, KC-180 */ 105 105 { USB_DEVICE(0x08e9, 0x0100) }, /* XTNDAccess */ 106 106 { USB_DEVICE(0x09c4, 0x0011) }, /* ACTiSys ACT-IR2000U */
+1 -1
drivers/usb/serial/iuu_phoenix.c
··· 43 43 #define DRIVER_VERSION "v0.11" 44 44 #define DRIVER_DESC "Infinity USB Unlimited Phoenix driver" 45 45 46 - static struct usb_device_id id_table[] = { 46 + static const struct usb_device_id id_table[] = { 47 47 {USB_DEVICE(IUU_USB_VENDOR_ID, IUU_USB_PRODUCT_ID)}, 48 48 {} /* Terminating entry */ 49 49 };
+5 -5
drivers/usb/serial/keyspan.h
··· 456 456 NULL, 457 457 }; 458 458 459 - static struct usb_device_id keyspan_ids_combined[] = { 459 + static const struct usb_device_id keyspan_ids_combined[] = { 460 460 { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa18x_pre_product_id) }, 461 461 { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19_pre_product_id) }, 462 462 { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19w_pre_product_id) }, ··· 497 497 }; 498 498 499 499 /* usb_device_id table for the pre-firmware download keyspan devices */ 500 - static struct usb_device_id keyspan_pre_ids[] = { 500 + static const struct usb_device_id keyspan_pre_ids[] = { 501 501 { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa18x_pre_product_id) }, 502 502 { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19_pre_product_id) }, 503 503 { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19qi_pre_product_id) }, ··· 513 513 { } /* Terminating entry */ 514 514 }; 515 515 516 - static struct usb_device_id keyspan_1port_ids[] = { 516 + static const struct usb_device_id keyspan_1port_ids[] = { 517 517 { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa18x_product_id) }, 518 518 { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19_product_id) }, 519 519 { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19qi_product_id) }, ··· 524 524 { } /* Terminating entry */ 525 525 }; 526 526 527 - static struct usb_device_id keyspan_2port_ids[] = { 527 + static const struct usb_device_id keyspan_2port_ids[] = { 528 528 { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28_product_id) }, 529 529 { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28x_product_id) }, 530 530 { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28xa_product_id) }, ··· 532 532 { } /* Terminating entry */ 533 533 }; 534 534 535 - static struct usb_device_id keyspan_4port_ids[] = { 535 + static const struct usb_device_id keyspan_4port_ids[] = { 536 536 { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa49w_product_id) }, 537 537 { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa49wlc_product_id)}, 538 538 { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa49wg_product_id)},
+4 -4
drivers/usb/serial/keyspan_pda.c
··· 125 125 #define ENTREGRA_VENDOR_ID 0x1645 126 126 #define ENTREGRA_FAKE_ID 0x8093 127 127 128 - static struct usb_device_id id_table_combined [] = { 128 + static const struct usb_device_id id_table_combined[] = { 129 129 #ifdef KEYSPAN 130 130 { USB_DEVICE(KEYSPAN_VENDOR_ID, KEYSPAN_PDA_FAKE_ID) }, 131 131 #endif ··· 147 147 .no_dynamic_id = 1, 148 148 }; 149 149 150 - static struct usb_device_id id_table_std [] = { 150 + static const struct usb_device_id id_table_std[] = { 151 151 { USB_DEVICE(KEYSPAN_VENDOR_ID, KEYSPAN_PDA_ID) }, 152 152 { } /* Terminating entry */ 153 153 }; 154 154 155 155 #ifdef KEYSPAN 156 - static struct usb_device_id id_table_fake [] = { 156 + static const struct usb_device_id id_table_fake[] = { 157 157 { USB_DEVICE(KEYSPAN_VENDOR_ID, KEYSPAN_PDA_FAKE_ID) }, 158 158 { } /* Terminating entry */ 159 159 }; 160 160 #endif 161 161 162 162 #ifdef XIRCOM 163 - static struct usb_device_id id_table_fake_xircom [] = { 163 + static const struct usb_device_id id_table_fake_xircom[] = { 164 164 { USB_DEVICE(XIRCOM_VENDOR_ID, XIRCOM_FAKE_ID) }, 165 165 { USB_DEVICE(ENTREGRA_VENDOR_ID, ENTREGRA_FAKE_ID) }, 166 166 { }
+1 -1
drivers/usb/serial/kl5kusb105.c
··· 94 94 /* 95 95 * All of the device info needed for the KLSI converters. 96 96 */ 97 - static struct usb_device_id id_table [] = { 97 + static const struct usb_device_id id_table[] = { 98 98 { USB_DEVICE(PALMCONNECT_VID, PALMCONNECT_PID) }, 99 99 { USB_DEVICE(KLSI_VID, KLSI_KL5KUSB105D_PID) }, 100 100 { } /* Terminating entry */
+1 -1
drivers/usb/serial/kobil_sct.c
··· 86 86 struct usb_serial_port *port, struct ktermios *old); 87 87 static void kobil_init_termios(struct tty_struct *tty); 88 88 89 - static struct usb_device_id id_table [] = { 89 + static const struct usb_device_id id_table[] = { 90 90 { USB_DEVICE(KOBIL_VENDOR_ID, KOBIL_ADAPTER_B_PRODUCT_ID) }, 91 91 { USB_DEVICE(KOBIL_VENDOR_ID, KOBIL_ADAPTER_K_PRODUCT_ID) }, 92 92 { USB_DEVICE(KOBIL_VENDOR_ID, KOBIL_USBTWIN_PRODUCT_ID) },
+1 -1
drivers/usb/serial/mct_u232.c
··· 111 111 /* 112 112 * All of the device info needed for the MCT USB-RS232 converter. 113 113 */ 114 - static struct usb_device_id id_table_combined [] = { 114 + static const struct usb_device_id id_table_combined[] = { 115 115 { USB_DEVICE(MCT_U232_VID, MCT_U232_PID) }, 116 116 { USB_DEVICE(MCT_U232_VID, MCT_U232_SITECOM_PID) }, 117 117 { USB_DEVICE(MCT_U232_VID, MCT_U232_DU_H3SP_PID) },
+1 -1
drivers/usb/serial/mos7720.c
··· 85 85 #define MOSCHIP_DEVICE_ID_7720 0x7720 86 86 #define MOSCHIP_DEVICE_ID_7715 0x7715 87 87 88 - static struct usb_device_id moschip_port_id_table[] = { 88 + static const struct usb_device_id moschip_port_id_table[] = { 89 89 { USB_DEVICE(USB_VENDOR_ID_MOSCHIP, MOSCHIP_DEVICE_ID_7720) }, 90 90 { } /* terminating entry */ 91 91 };
+2 -2
drivers/usb/serial/mos7840.c
··· 181 181 #define URB_TRANSFER_BUFFER_SIZE 32 /* URB Size */ 182 182 183 183 184 - static struct usb_device_id moschip_port_id_table[] = { 184 + static const struct usb_device_id moschip_port_id_table[] = { 185 185 {USB_DEVICE(USB_VENDOR_ID_MOSCHIP, MOSCHIP_DEVICE_ID_7840)}, 186 186 {USB_DEVICE(USB_VENDOR_ID_MOSCHIP, MOSCHIP_DEVICE_ID_7820)}, 187 187 {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USO9ML2_2)}, ··· 198 198 {} /* terminating entry */ 199 199 }; 200 200 201 - static __devinitdata struct usb_device_id moschip_id_table_combined[] = { 201 + static const struct usb_device_id moschip_id_table_combined[] __devinitconst = { 202 202 {USB_DEVICE(USB_VENDOR_ID_MOSCHIP, MOSCHIP_DEVICE_ID_7840)}, 203 203 {USB_DEVICE(USB_VENDOR_ID_MOSCHIP, MOSCHIP_DEVICE_ID_7820)}, 204 204 {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USO9ML2_2)},
+1 -1
drivers/usb/serial/moto_modem.c
··· 21 21 #include <linux/usb.h> 22 22 #include <linux/usb/serial.h> 23 23 24 - static struct usb_device_id id_table [] = { 24 + static const struct usb_device_id id_table[] = { 25 25 { USB_DEVICE(0x05c6, 0x3197) }, /* unknown Motorola phone */ 26 26 { USB_DEVICE(0x0c44, 0x0022) }, /* unknown Mororola phone */ 27 27 { USB_DEVICE(0x22b8, 0x2a64) }, /* Motorola KRZR K1m */
+1 -1
drivers/usb/serial/navman.c
··· 22 22 23 23 static int debug; 24 24 25 - static struct usb_device_id id_table [] = { 25 + static const struct usb_device_id id_table[] = { 26 26 { USB_DEVICE(0x0a99, 0x0001) }, /* Talon Technology device */ 27 27 { }, 28 28 };
+1 -1
drivers/usb/serial/omninet.c
··· 75 75 static void omninet_release(struct usb_serial *serial); 76 76 static int omninet_attach(struct usb_serial *serial); 77 77 78 - static struct usb_device_id id_table[] = { 78 + static const struct usb_device_id id_table[] = { 79 79 { USB_DEVICE(ZYXEL_VENDOR_ID, ZYXEL_OMNINET_ID) }, 80 80 { USB_DEVICE(ZYXEL_VENDOR_ID, BT_IGNITIONPRO_ID) }, 81 81 { } /* Terminating entry */
+1 -1
drivers/usb/serial/opticon.c
··· 22 22 23 23 static int debug; 24 24 25 - static struct usb_device_id id_table[] = { 25 + static const struct usb_device_id id_table[] = { 26 26 { USB_DEVICE(0x065a, 0x0009) }, 27 27 { }, 28 28 };
+1 -1
drivers/usb/serial/option.c
··· 344 344 #define HAIER_VENDOR_ID 0x201e 345 345 #define HAIER_PRODUCT_CE100 0x2009 346 346 347 - static struct usb_device_id option_ids[] = { 347 + static const struct usb_device_id option_ids[] = { 348 348 { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) }, 349 349 { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) }, 350 350 { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA_LIGHT) },
+1 -1
drivers/usb/serial/oti6858.c
··· 58 58 #define OTI6858_AUTHOR "Tomasz Michal Lukaszewski <FIXME@FIXME>" 59 59 #define OTI6858_VERSION "0.1" 60 60 61 - static struct usb_device_id id_table [] = { 61 + static const struct usb_device_id id_table[] = { 62 62 { USB_DEVICE(OTI6858_VENDOR_ID, OTI6858_PRODUCT_ID) }, 63 63 { } 64 64 };
+1 -1
drivers/usb/serial/pl2303.c
··· 50 50 char *buf_put; 51 51 }; 52 52 53 - static struct usb_device_id id_table [] = { 53 + static const struct usb_device_id id_table[] = { 54 54 { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID) }, 55 55 { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_RSAQ2) }, 56 56 { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_DCU11) },
+1 -1
drivers/usb/serial/qcserial.c
··· 21 21 22 22 static int debug; 23 23 24 - static struct usb_device_id id_table[] = { 24 + static const struct usb_device_id id_table[] = { 25 25 {USB_DEVICE(0x05c6, 0x9211)}, /* Acer Gobi QDL device */ 26 26 {USB_DEVICE(0x05c6, 0x9212)}, /* Acer Gobi Modem Device */ 27 27 {USB_DEVICE(0x03f0, 0x1f1d)}, /* HP un2400 Gobi Modem Device */
+1 -1
drivers/usb/serial/siemens_mpi.c
··· 22 22 #define DRIVER_DESC "Driver for Siemens USB/MPI adapter" 23 23 24 24 25 - static struct usb_device_id id_table[] = { 25 + static const struct usb_device_id id_table[] = { 26 26 /* Vendor and product id for 6ES7-972-0CB20-0XA0 */ 27 27 { USB_DEVICE(0x908, 0x0004) }, 28 28 { },
+1 -1
drivers/usb/serial/sierra.c
··· 226 226 .ifaceinfo = direct_ip_non_serial_ifaces, 227 227 }; 228 228 229 - static struct usb_device_id id_table [] = { 229 + static const struct usb_device_id id_table[] = { 230 230 { USB_DEVICE(0x0F3D, 0x0112) }, /* Airprime/Sierra PC 5220 */ 231 231 { USB_DEVICE(0x03F0, 0x1B1D) }, /* HP ev2200 a.k.a MC5720 */ 232 232 { USB_DEVICE(0x03F0, 0x1E1D) }, /* HP hs2300 a.k.a MC8775 */
+1 -1
drivers/usb/serial/spcp8x5.c
··· 45 45 #define SPCP8x5_835_VID 0x04fc 46 46 #define SPCP8x5_835_PID 0x0231 47 47 48 - static struct usb_device_id id_table [] = { 48 + static const struct usb_device_id id_table[] = { 49 49 { USB_DEVICE(SPCP8x5_PHILIPS_VID , SPCP8x5_PHILIPS_PID)}, 50 50 { USB_DEVICE(SPCP8x5_INTERMATIC_VID, SPCP8x5_INTERMATIC_PID)}, 51 51 { USB_DEVICE(SPCP8x5_835_VID, SPCP8x5_835_PID)},
+1 -1
drivers/usb/serial/symbolserial.c
··· 21 21 22 22 static int debug; 23 23 24 - static struct usb_device_id id_table[] = { 24 + static const struct usb_device_id id_table[] = { 25 25 { USB_DEVICE(0x05e0, 0x0600) }, 26 26 { }, 27 27 };
+1 -1
drivers/usb/serial/usb_debug.c
··· 29 29 0xff, 30 30 }; 31 31 32 - static struct usb_device_id id_table [] = { 32 + static const struct usb_device_id id_table[] = { 33 33 { USB_DEVICE(0x0525, 0x127a) }, 34 34 { }, 35 35 };
+3 -3
drivers/usb/serial/whiteheat.c
··· 111 111 separate ID tables, and then a third table that combines them 112 112 just for the purpose of exporting the autoloading information. 113 113 */ 114 - static struct usb_device_id id_table_std [] = { 114 + static const struct usb_device_id id_table_std[] = { 115 115 { USB_DEVICE(CONNECT_TECH_VENDOR_ID, CONNECT_TECH_WHITE_HEAT_ID) }, 116 116 { } /* Terminating entry */ 117 117 }; 118 118 119 - static struct usb_device_id id_table_prerenumeration [] = { 119 + static const struct usb_device_id id_table_prerenumeration[] = { 120 120 { USB_DEVICE(CONNECT_TECH_VENDOR_ID, CONNECT_TECH_FAKE_WHITE_HEAT_ID) }, 121 121 { } /* Terminating entry */ 122 122 }; 123 123 124 - static struct usb_device_id id_table_combined [] = { 124 + static const struct usb_device_id id_table_combined[] = { 125 125 { USB_DEVICE(CONNECT_TECH_VENDOR_ID, CONNECT_TECH_WHITE_HEAT_ID) }, 126 126 { USB_DEVICE(CONNECT_TECH_VENDOR_ID, CONNECT_TECH_FAKE_WHITE_HEAT_ID) }, 127 127 { } /* Terminating entry */