diff options
author | Arjan van de Ven <arjan@infradead.org> | 2005-11-29 03:43:42 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-01-04 16:51:40 -0500 |
commit | 4c4c9432a6c916729c7296c47fe93b053a73e20c (patch) | |
tree | 7f02f456359259da8bae5e3d32fc4411311ee135 /drivers | |
parent | 9fe6fcd8ccb2c8c661dfd1e07e3122aef31a67d4 (diff) |
[PATCH] USB: mark various usb tables const
patch below marks various USB tables and variables as const so that they
end up in .rodata section and don't cacheline share with things that get
written to. For the non-array variables it also allows gcc to optimize
more.
Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/class/cdc-acm.c | 4 | ||||
-rw-r--r-- | drivers/usb/class/usblp.c | 4 | ||||
-rw-r--r-- | drivers/usb/core/devices.c | 20 | ||||
-rw-r--r-- | drivers/usb/host/uhci-debug.c | 2 | ||||
-rw-r--r-- | drivers/usb/input/aiptek.c | 2 | ||||
-rw-r--r-- | drivers/usb/input/ati_remote.c | 4 | ||||
-rw-r--r-- | drivers/usb/input/fixp-arith.h | 2 | ||||
-rw-r--r-- | drivers/usb/input/hid-core.c | 2 | ||||
-rw-r--r-- | drivers/usb/input/hid-input.c | 4 | ||||
-rw-r--r-- | drivers/usb/input/keyspan_remote.c | 2 | ||||
-rw-r--r-- | drivers/usb/input/xpad.c | 6 | ||||
-rw-r--r-- | drivers/usb/media/konicawc.c | 6 | ||||
-rw-r--r-- | drivers/usb/media/ov511.c | 2 | ||||
-rw-r--r-- | drivers/usb/media/pwc/pwc-ctrl.c | 2 | ||||
-rw-r--r-- | drivers/usb/media/stv680.h | 6 | ||||
-rw-r--r-- | drivers/usb/media/usbvideo.c | 2 | ||||
-rw-r--r-- | drivers/usb/misc/sisusbvga/sisusb.c | 4 | ||||
-rw-r--r-- | drivers/usb/serial/ftdi_sio.c | 2 | ||||
-rw-r--r-- | drivers/usb/serial/io_edgeport.c | 2 | ||||
-rw-r--r-- | drivers/usb/serial/io_fw_boot2.h | 2 | ||||
-rw-r--r-- | drivers/usb/serial/safe_serial.c | 2 | ||||
-rw-r--r-- | drivers/usb/storage/sddr09.c | 2 | ||||
-rw-r--r-- | drivers/usb/storage/usb.c | 2 |
23 files changed, 43 insertions, 43 deletions
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index 93de121f52a8..248279e44c99 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c | |||
@@ -658,7 +658,7 @@ static int acm_tty_ioctl(struct tty_struct *tty, struct file *file, unsigned int | |||
658 | return -ENOIOCTLCMD; | 658 | return -ENOIOCTLCMD; |
659 | } | 659 | } |
660 | 660 | ||
661 | static __u32 acm_tty_speed[] = { | 661 | static const __u32 acm_tty_speed[] = { |
662 | 0, 50, 75, 110, 134, 150, 200, 300, 600, | 662 | 0, 50, 75, 110, 134, 150, 200, 300, 600, |
663 | 1200, 1800, 2400, 4800, 9600, 19200, 38400, | 663 | 1200, 1800, 2400, 4800, 9600, 19200, 38400, |
664 | 57600, 115200, 230400, 460800, 500000, 576000, | 664 | 57600, 115200, 230400, 460800, 500000, 576000, |
@@ -666,7 +666,7 @@ static __u32 acm_tty_speed[] = { | |||
666 | 2500000, 3000000, 3500000, 4000000 | 666 | 2500000, 3000000, 3500000, 4000000 |
667 | }; | 667 | }; |
668 | 668 | ||
669 | static __u8 acm_tty_size[] = { | 669 | static const __u8 acm_tty_size[] = { |
670 | 5, 6, 7, 8 | 670 | 5, 6, 7, 8 |
671 | }; | 671 | }; |
672 | 672 | ||
diff --git a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c index 10406b857ac7..6918037e209c 100644 --- a/drivers/usb/class/usblp.c +++ b/drivers/usb/class/usblp.c | |||
@@ -199,7 +199,7 @@ struct quirk_printer_struct { | |||
199 | #define USBLP_QUIRK_BIDIR 0x1 /* reports bidir but requires unidirectional mode (no INs/reads) */ | 199 | #define USBLP_QUIRK_BIDIR 0x1 /* reports bidir but requires unidirectional mode (no INs/reads) */ |
200 | #define USBLP_QUIRK_USB_INIT 0x2 /* needs vendor USB init string */ | 200 | #define USBLP_QUIRK_USB_INIT 0x2 /* needs vendor USB init string */ |
201 | 201 | ||
202 | static struct quirk_printer_struct quirk_printers[] = { | 202 | static const struct quirk_printer_struct quirk_printers[] = { |
203 | { 0x03f0, 0x0004, USBLP_QUIRK_BIDIR }, /* HP DeskJet 895C */ | 203 | { 0x03f0, 0x0004, USBLP_QUIRK_BIDIR }, /* HP DeskJet 895C */ |
204 | { 0x03f0, 0x0104, USBLP_QUIRK_BIDIR }, /* HP DeskJet 880C */ | 204 | { 0x03f0, 0x0104, USBLP_QUIRK_BIDIR }, /* HP DeskJet 880C */ |
205 | { 0x03f0, 0x0204, USBLP_QUIRK_BIDIR }, /* HP DeskJet 815C */ | 205 | { 0x03f0, 0x0204, USBLP_QUIRK_BIDIR }, /* HP DeskJet 815C */ |
@@ -301,7 +301,7 @@ static void usblp_bulk_write(struct urb *urb, struct pt_regs *regs) | |||
301 | * Get and print printer errors. | 301 | * Get and print printer errors. |
302 | */ | 302 | */ |
303 | 303 | ||
304 | static char *usblp_messages[] = { "ok", "out of paper", "off-line", "on fire" }; | 304 | static const char *usblp_messages[] = { "ok", "out of paper", "off-line", "on fire" }; |
305 | 305 | ||
306 | static int usblp_check_status(struct usblp *usblp, int err) | 306 | static int usblp_check_status(struct usblp *usblp, int err) |
307 | { | 307 | { |
diff --git a/drivers/usb/core/devices.c b/drivers/usb/core/devices.c index 55bc563a3256..2684e15b813b 100644 --- a/drivers/usb/core/devices.c +++ b/drivers/usb/core/devices.c | |||
@@ -67,45 +67,45 @@ | |||
67 | /* Define ALLOW_SERIAL_NUMBER if you want to see the serial number of devices */ | 67 | /* Define ALLOW_SERIAL_NUMBER if you want to see the serial number of devices */ |
68 | #define ALLOW_SERIAL_NUMBER | 68 | #define ALLOW_SERIAL_NUMBER |
69 | 69 | ||
70 | static char *format_topo = | 70 | static const char *format_topo = |
71 | /* T: Bus=dd Lev=dd Prnt=dd Port=dd Cnt=dd Dev#=ddd Spd=ddd MxCh=dd */ | 71 | /* T: Bus=dd Lev=dd Prnt=dd Port=dd Cnt=dd Dev#=ddd Spd=ddd MxCh=dd */ |
72 | "\nT: Bus=%2.2d Lev=%2.2d Prnt=%2.2d Port=%2.2d Cnt=%2.2d Dev#=%3d Spd=%3s MxCh=%2d\n"; | 72 | "\nT: Bus=%2.2d Lev=%2.2d Prnt=%2.2d Port=%2.2d Cnt=%2.2d Dev#=%3d Spd=%3s MxCh=%2d\n"; |
73 | 73 | ||
74 | static char *format_string_manufacturer = | 74 | static const char *format_string_manufacturer = |
75 | /* S: Manufacturer=xxxx */ | 75 | /* S: Manufacturer=xxxx */ |
76 | "S: Manufacturer=%.100s\n"; | 76 | "S: Manufacturer=%.100s\n"; |
77 | 77 | ||
78 | static char *format_string_product = | 78 | static const char *format_string_product = |
79 | /* S: Product=xxxx */ | 79 | /* S: Product=xxxx */ |
80 | "S: Product=%.100s\n"; | 80 | "S: Product=%.100s\n"; |
81 | 81 | ||
82 | #ifdef ALLOW_SERIAL_NUMBER | 82 | #ifdef ALLOW_SERIAL_NUMBER |
83 | static char *format_string_serialnumber = | 83 | static const char *format_string_serialnumber = |
84 | /* S: SerialNumber=xxxx */ | 84 | /* S: SerialNumber=xxxx */ |
85 | "S: SerialNumber=%.100s\n"; | 85 | "S: SerialNumber=%.100s\n"; |
86 | #endif | 86 | #endif |
87 | 87 | ||
88 | static char *format_bandwidth = | 88 | static const char *format_bandwidth = |
89 | /* B: Alloc=ddd/ddd us (xx%), #Int=ddd, #Iso=ddd */ | 89 | /* B: Alloc=ddd/ddd us (xx%), #Int=ddd, #Iso=ddd */ |
90 | "B: Alloc=%3d/%3d us (%2d%%), #Int=%3d, #Iso=%3d\n"; | 90 | "B: Alloc=%3d/%3d us (%2d%%), #Int=%3d, #Iso=%3d\n"; |
91 | 91 | ||
92 | static char *format_device1 = | 92 | static const char *format_device1 = |
93 | /* D: Ver=xx.xx Cls=xx(sssss) Sub=xx Prot=xx MxPS=dd #Cfgs=dd */ | 93 | /* D: Ver=xx.xx Cls=xx(sssss) Sub=xx Prot=xx MxPS=dd #Cfgs=dd */ |
94 | "D: Ver=%2x.%02x Cls=%02x(%-5s) Sub=%02x Prot=%02x MxPS=%2d #Cfgs=%3d\n"; | 94 | "D: Ver=%2x.%02x Cls=%02x(%-5s) Sub=%02x Prot=%02x MxPS=%2d #Cfgs=%3d\n"; |
95 | 95 | ||
96 | static char *format_device2 = | 96 | static const char *format_device2 = |
97 | /* P: Vendor=xxxx ProdID=xxxx Rev=xx.xx */ | 97 | /* P: Vendor=xxxx ProdID=xxxx Rev=xx.xx */ |
98 | "P: Vendor=%04x ProdID=%04x Rev=%2x.%02x\n"; | 98 | "P: Vendor=%04x ProdID=%04x Rev=%2x.%02x\n"; |
99 | 99 | ||
100 | static char *format_config = | 100 | static const char *format_config = |
101 | /* C: #Ifs=dd Cfg#=dd Atr=xx MPwr=dddmA */ | 101 | /* C: #Ifs=dd Cfg#=dd Atr=xx MPwr=dddmA */ |
102 | "C:%c #Ifs=%2d Cfg#=%2d Atr=%02x MxPwr=%3dmA\n"; | 102 | "C:%c #Ifs=%2d Cfg#=%2d Atr=%02x MxPwr=%3dmA\n"; |
103 | 103 | ||
104 | static char *format_iface = | 104 | static const char *format_iface = |
105 | /* I: If#=dd Alt=dd #EPs=dd Cls=xx(sssss) Sub=xx Prot=xx Driver=xxxx*/ | 105 | /* I: If#=dd Alt=dd #EPs=dd Cls=xx(sssss) Sub=xx Prot=xx Driver=xxxx*/ |
106 | "I: If#=%2d Alt=%2d #EPs=%2d Cls=%02x(%-5s) Sub=%02x Prot=%02x Driver=%s\n"; | 106 | "I: If#=%2d Alt=%2d #EPs=%2d Cls=%02x(%-5s) Sub=%02x Prot=%02x Driver=%s\n"; |
107 | 107 | ||
108 | static char *format_endpt = | 108 | static const char *format_endpt = |
109 | /* E: Ad=xx(s) Atr=xx(ssss) MxPS=dddd Ivl=D?s */ | 109 | /* E: Ad=xx(s) Atr=xx(ssss) MxPS=dddd Ivl=D?s */ |
110 | "E: Ad=%02x(%c) Atr=%02x(%-4s) MxPS=%4d Ivl=%d%cs\n"; | 110 | "E: Ad=%02x(%c) Atr=%02x(%-4s) MxPS=%4d Ivl=%d%cs\n"; |
111 | 111 | ||
diff --git a/drivers/usb/host/uhci-debug.c b/drivers/usb/host/uhci-debug.c index 151154df37fa..cab02e15bfee 100644 --- a/drivers/usb/host/uhci-debug.c +++ b/drivers/usb/host/uhci-debug.c | |||
@@ -197,7 +197,7 @@ out: | |||
197 | } | 197 | } |
198 | 198 | ||
199 | #ifdef CONFIG_PROC_FS | 199 | #ifdef CONFIG_PROC_FS |
200 | static const char *qh_names[] = { | 200 | static const char * const qh_names[] = { |
201 | "skel_int128_qh", "skel_int64_qh", | 201 | "skel_int128_qh", "skel_int64_qh", |
202 | "skel_int32_qh", "skel_int16_qh", | 202 | "skel_int32_qh", "skel_int16_qh", |
203 | "skel_int8_qh", "skel_int4_qh", | 203 | "skel_int8_qh", "skel_int4_qh", |
diff --git a/drivers/usb/input/aiptek.c b/drivers/usb/input/aiptek.c index 356284c746a0..87ae08c99bc4 100644 --- a/drivers/usb/input/aiptek.c +++ b/drivers/usb/input/aiptek.c | |||
@@ -338,7 +338,7 @@ struct aiptek { | |||
338 | * the bitmap which comes from the tablet. This hides the | 338 | * the bitmap which comes from the tablet. This hides the |
339 | * issue that the F_keys are not sequentially numbered. | 339 | * issue that the F_keys are not sequentially numbered. |
340 | */ | 340 | */ |
341 | static int macroKeyEvents[] = { | 341 | static const int macroKeyEvents[] = { |
342 | KEY_ESC, KEY_F1, KEY_F2, KEY_F3, KEY_F4, KEY_F5, | 342 | KEY_ESC, KEY_F1, KEY_F2, KEY_F3, KEY_F4, KEY_F5, |
343 | KEY_F6, KEY_F7, KEY_F8, KEY_F9, KEY_F10, KEY_F11, | 343 | KEY_F6, KEY_F7, KEY_F8, KEY_F9, KEY_F10, KEY_F11, |
344 | KEY_F12, KEY_F13, KEY_F14, KEY_F15, KEY_F16, KEY_F17, | 344 | KEY_F12, KEY_F13, KEY_F14, KEY_F15, KEY_F16, KEY_F17, |
diff --git a/drivers/usb/input/ati_remote.c b/drivers/usb/input/ati_remote.c index 8948e5c3941f..b78a4d81b0a3 100644 --- a/drivers/usb/input/ati_remote.c +++ b/drivers/usb/input/ati_remote.c | |||
@@ -146,7 +146,7 @@ static char init1[] = { 0x01, 0x00, 0x20, 0x14 }; | |||
146 | static char init2[] = { 0x01, 0x00, 0x20, 0x14, 0x20, 0x20, 0x20 }; | 146 | static char init2[] = { 0x01, 0x00, 0x20, 0x14, 0x20, 0x20, 0x20 }; |
147 | 147 | ||
148 | /* Acceleration curve for directional control pad */ | 148 | /* Acceleration curve for directional control pad */ |
149 | static char accel[] = { 1, 2, 4, 6, 9, 13, 20 }; | 149 | static const char accel[] = { 1, 2, 4, 6, 9, 13, 20 }; |
150 | 150 | ||
151 | /* Duplicate event filtering time. | 151 | /* Duplicate event filtering time. |
152 | * Sequential, identical KIND_FILTERED inputs with less than | 152 | * Sequential, identical KIND_FILTERED inputs with less than |
@@ -197,7 +197,7 @@ struct ati_remote { | |||
197 | #define KIND_ACCEL 7 /* Directional keypad - left, right, up, down.*/ | 197 | #define KIND_ACCEL 7 /* Directional keypad - left, right, up, down.*/ |
198 | 198 | ||
199 | /* Translation table from hardware messages to input events. */ | 199 | /* Translation table from hardware messages to input events. */ |
200 | static struct { | 200 | static const struct { |
201 | short kind; | 201 | short kind; |
202 | unsigned char data1, data2; | 202 | unsigned char data1, data2; |
203 | int type; | 203 | int type; |
diff --git a/drivers/usb/input/fixp-arith.h b/drivers/usb/input/fixp-arith.h index 26ca5b890a61..b44d398de071 100644 --- a/drivers/usb/input/fixp-arith.h +++ b/drivers/usb/input/fixp-arith.h | |||
@@ -38,7 +38,7 @@ typedef s16 fixp_t; | |||
38 | #define FRAC_MASK ((1<<FRAC_N)-1) | 38 | #define FRAC_MASK ((1<<FRAC_N)-1) |
39 | 39 | ||
40 | // Not to be used directly. Use fixp_{cos,sin} | 40 | // Not to be used directly. Use fixp_{cos,sin} |
41 | static fixp_t cos_table[45] = { | 41 | static const fixp_t cos_table[45] = { |
42 | 0x0100, 0x00FF, 0x00FF, 0x00FE, 0x00FD, 0x00FC, 0x00FA, 0x00F8, | 42 | 0x0100, 0x00FF, 0x00FF, 0x00FE, 0x00FD, 0x00FC, 0x00FA, 0x00F8, |
43 | 0x00F6, 0x00F3, 0x00F0, 0x00ED, 0x00E9, 0x00E6, 0x00E2, 0x00DD, | 43 | 0x00F6, 0x00F3, 0x00F0, 0x00ED, 0x00E9, 0x00E6, 0x00E2, 0x00DD, |
44 | 0x00D9, 0x00D4, 0x00CF, 0x00C9, 0x00C4, 0x00BE, 0x00B8, 0x00B1, | 44 | 0x00D9, 0x00D4, 0x00CF, 0x00C9, 0x00C4, 0x00BE, 0x00B8, 0x00B1, |
diff --git a/drivers/usb/input/hid-core.c b/drivers/usb/input/hid-core.c index 256d7325d4a5..5f52979af1c7 100644 --- a/drivers/usb/input/hid-core.c +++ b/drivers/usb/input/hid-core.c | |||
@@ -1454,7 +1454,7 @@ void hid_init_reports(struct hid_device *hid) | |||
1454 | * Alphabetically sorted blacklist by quirk type. | 1454 | * Alphabetically sorted blacklist by quirk type. |
1455 | */ | 1455 | */ |
1456 | 1456 | ||
1457 | static struct hid_blacklist { | 1457 | static const struct hid_blacklist { |
1458 | __u16 idVendor; | 1458 | __u16 idVendor; |
1459 | __u16 idProduct; | 1459 | __u16 idProduct; |
1460 | unsigned quirks; | 1460 | unsigned quirks; |
diff --git a/drivers/usb/input/hid-input.c b/drivers/usb/input/hid-input.c index 1220a5004a5c..192a03b28971 100644 --- a/drivers/usb/input/hid-input.c +++ b/drivers/usb/input/hid-input.c | |||
@@ -39,7 +39,7 @@ | |||
39 | 39 | ||
40 | #define unk KEY_UNKNOWN | 40 | #define unk KEY_UNKNOWN |
41 | 41 | ||
42 | static unsigned char hid_keyboard[256] = { | 42 | static const unsigned char hid_keyboard[256] = { |
43 | 0, 0, 0, 0, 30, 48, 46, 32, 18, 33, 34, 35, 23, 36, 37, 38, | 43 | 0, 0, 0, 0, 30, 48, 46, 32, 18, 33, 34, 35, 23, 36, 37, 38, |
44 | 50, 49, 24, 25, 16, 19, 31, 20, 22, 47, 17, 45, 21, 44, 2, 3, | 44 | 50, 49, 24, 25, 16, 19, 31, 20, 22, 47, 17, 45, 21, 44, 2, 3, |
45 | 4, 5, 6, 7, 8, 9, 10, 11, 28, 1, 14, 15, 57, 12, 13, 26, | 45 | 4, 5, 6, 7, 8, 9, 10, 11, 28, 1, 14, 15, 57, 12, 13, 26, |
@@ -58,7 +58,7 @@ static unsigned char hid_keyboard[256] = { | |||
58 | 150,158,159,128,136,177,178,176,142,152,173,140,unk,unk,unk,unk | 58 | 150,158,159,128,136,177,178,176,142,152,173,140,unk,unk,unk,unk |
59 | }; | 59 | }; |
60 | 60 | ||
61 | static struct { | 61 | static const struct { |
62 | __s32 x; | 62 | __s32 x; |
63 | __s32 y; | 63 | __s32 y; |
64 | } hid_hat_to_axis[] = {{ 0, 0}, { 0,-1}, { 1,-1}, { 1, 0}, { 1, 1}, { 0, 1}, {-1, 1}, {-1, 0}, {-1,-1}}; | 64 | } hid_hat_to_axis[] = {{ 0, 0}, { 0,-1}, { 1,-1}, { 1, 0}, { 1, 1}, { 0, 1}, {-1, 1}, {-1, 0}, {-1,-1}}; |
diff --git a/drivers/usb/input/keyspan_remote.c b/drivers/usb/input/keyspan_remote.c index 5ae5201dbf5a..b4a051b549d1 100644 --- a/drivers/usb/input/keyspan_remote.c +++ b/drivers/usb/input/keyspan_remote.c | |||
@@ -95,7 +95,7 @@ struct usb_keyspan { | |||
95 | * Currently there are 15 and 17 button models so RESERVED codes | 95 | * Currently there are 15 and 17 button models so RESERVED codes |
96 | * are blank areas in the mapping. | 96 | * are blank areas in the mapping. |
97 | */ | 97 | */ |
98 | static int keyspan_key_table[] = { | 98 | static const int keyspan_key_table[] = { |
99 | KEY_RESERVED, /* 0 is just a place holder. */ | 99 | KEY_RESERVED, /* 0 is just a place holder. */ |
100 | KEY_RESERVED, | 100 | KEY_RESERVED, |
101 | KEY_STOP, | 101 | KEY_STOP, |
diff --git a/drivers/usb/input/xpad.c b/drivers/usb/input/xpad.c index e421328615fb..e278489a80c6 100644 --- a/drivers/usb/input/xpad.c +++ b/drivers/usb/input/xpad.c | |||
@@ -70,7 +70,7 @@ | |||
70 | 70 | ||
71 | #define XPAD_PKT_LEN 32 | 71 | #define XPAD_PKT_LEN 32 |
72 | 72 | ||
73 | static struct xpad_device { | 73 | static const struct xpad_device { |
74 | u16 idVendor; | 74 | u16 idVendor; |
75 | u16 idProduct; | 75 | u16 idProduct; |
76 | char *name; | 76 | char *name; |
@@ -81,13 +81,13 @@ static struct xpad_device { | |||
81 | { 0x0000, 0x0000, "X-Box pad" } | 81 | { 0x0000, 0x0000, "X-Box pad" } |
82 | }; | 82 | }; |
83 | 83 | ||
84 | static signed short xpad_btn[] = { | 84 | static const signed short xpad_btn[] = { |
85 | BTN_A, BTN_B, BTN_C, BTN_X, BTN_Y, BTN_Z, /* "analog" buttons */ | 85 | BTN_A, BTN_B, BTN_C, BTN_X, BTN_Y, BTN_Z, /* "analog" buttons */ |
86 | BTN_START, BTN_BACK, BTN_THUMBL, BTN_THUMBR, /* start/back/sticks */ | 86 | BTN_START, BTN_BACK, BTN_THUMBL, BTN_THUMBR, /* start/back/sticks */ |
87 | -1 /* terminating entry */ | 87 | -1 /* terminating entry */ |
88 | }; | 88 | }; |
89 | 89 | ||
90 | static signed short xpad_abs[] = { | 90 | static const signed short xpad_abs[] = { |
91 | ABS_X, ABS_Y, /* left stick */ | 91 | ABS_X, ABS_Y, /* left stick */ |
92 | ABS_RX, ABS_RY, /* right stick */ | 92 | ABS_RX, ABS_RY, /* right stick */ |
93 | ABS_Z, ABS_RZ, /* triggers left/right */ | 93 | ABS_Z, ABS_RZ, /* triggers left/right */ |
diff --git a/drivers/usb/media/konicawc.c b/drivers/usb/media/konicawc.c index 9fe2c2710d13..e2ede583518f 100644 --- a/drivers/usb/media/konicawc.c +++ b/drivers/usb/media/konicawc.c | |||
@@ -77,14 +77,14 @@ static int saturation = MAX_SATURATION/2; | |||
77 | static int sharpness = MAX_SHARPNESS/2; | 77 | static int sharpness = MAX_SHARPNESS/2; |
78 | static int whitebal = 3*(MAX_WHITEBAL/4); | 78 | static int whitebal = 3*(MAX_WHITEBAL/4); |
79 | 79 | ||
80 | static int spd_to_iface[] = { 1, 0, 3, 2, 4, 5, 6 }; | 80 | static const int spd_to_iface[] = { 1, 0, 3, 2, 4, 5, 6 }; |
81 | 81 | ||
82 | /* These FPS speeds are from the windows config box. They are | 82 | /* These FPS speeds are from the windows config box. They are |
83 | * indexed on size (0-2) and speed (0-6). Divide by 3 to get the | 83 | * indexed on size (0-2) and speed (0-6). Divide by 3 to get the |
84 | * real fps. | 84 | * real fps. |
85 | */ | 85 | */ |
86 | 86 | ||
87 | static int spd_to_fps[][7] = { { 24, 40, 48, 60, 72, 80, 100 }, | 87 | static const int spd_to_fps[][7] = { { 24, 40, 48, 60, 72, 80, 100 }, |
88 | { 24, 40, 48, 60, 72, 80, 100 }, | 88 | { 24, 40, 48, 60, 72, 80, 100 }, |
89 | { 18, 30, 36, 45, 54, 60, 75 }, | 89 | { 18, 30, 36, 45, 54, 60, 75 }, |
90 | { 6, 10, 12, 15, 18, 21, 25 } }; | 90 | { 6, 10, 12, 15, 18, 21, 25 } }; |
@@ -95,7 +95,7 @@ struct cam_size { | |||
95 | u8 cmd; | 95 | u8 cmd; |
96 | }; | 96 | }; |
97 | 97 | ||
98 | static struct cam_size camera_sizes[] = { { 160, 120, 0x7 }, | 98 | static const struct cam_size camera_sizes[] = { { 160, 120, 0x7 }, |
99 | { 160, 136, 0xa }, | 99 | { 160, 136, 0xa }, |
100 | { 176, 144, 0x4 }, | 100 | { 176, 144, 0x4 }, |
101 | { 320, 240, 0x5 } }; | 101 | { 320, 240, 0x5 } }; |
diff --git a/drivers/usb/media/ov511.c b/drivers/usb/media/ov511.c index 8df4f9de5ee5..3a0e8ce67ebe 100644 --- a/drivers/usb/media/ov511.c +++ b/drivers/usb/media/ov511.c | |||
@@ -211,7 +211,7 @@ static struct ov51x_decomp_ops *ov518_mmx_decomp_ops; | |||
211 | 211 | ||
212 | /* Number of times to retry a failed I2C transaction. Increase this if you | 212 | /* Number of times to retry a failed I2C transaction. Increase this if you |
213 | * are getting "Failed to read sensor ID..." */ | 213 | * are getting "Failed to read sensor ID..." */ |
214 | static int i2c_detect_tries = 5; | 214 | static const int i2c_detect_tries = 5; |
215 | 215 | ||
216 | /* MMX support is present in kernel and CPU. Checked upon decomp module load. */ | 216 | /* MMX support is present in kernel and CPU. Checked upon decomp module load. */ |
217 | #if defined(__i386__) || defined(__x86_64__) | 217 | #if defined(__i386__) || defined(__x86_64__) |
diff --git a/drivers/usb/media/pwc/pwc-ctrl.c b/drivers/usb/media/pwc/pwc-ctrl.c index 53099190952c..359c4b2df735 100644 --- a/drivers/usb/media/pwc/pwc-ctrl.c +++ b/drivers/usb/media/pwc/pwc-ctrl.c | |||
@@ -109,7 +109,7 @@ | |||
109 | #define PT_RESET_CONTROL_FORMATTER 0x02 | 109 | #define PT_RESET_CONTROL_FORMATTER 0x02 |
110 | #define PT_STATUS_FORMATTER 0x03 | 110 | #define PT_STATUS_FORMATTER 0x03 |
111 | 111 | ||
112 | static char *size2name[PSZ_MAX] = | 112 | static const char *size2name[PSZ_MAX] = |
113 | { | 113 | { |
114 | "subQCIF", | 114 | "subQCIF", |
115 | "QSIF", | 115 | "QSIF", |
diff --git a/drivers/usb/media/stv680.h b/drivers/usb/media/stv680.h index 445940612603..b0551cdb280b 100644 --- a/drivers/usb/media/stv680.h +++ b/drivers/usb/media/stv680.h | |||
@@ -151,7 +151,7 @@ struct usb_stv { | |||
151 | }; | 151 | }; |
152 | 152 | ||
153 | 153 | ||
154 | static unsigned char red[256] = { | 154 | static const unsigned char red[256] = { |
155 | 0, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, | 155 | 0, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, |
156 | 18, 18, 18, 18, 18, 18, 18, 25, 30, 35, 38, 42, | 156 | 18, 18, 18, 18, 18, 18, 18, 25, 30, 35, 38, 42, |
157 | 44, 47, 50, 53, 54, 57, 59, 61, 63, 65, 67, 69, | 157 | 44, 47, 50, 53, 54, 57, 59, 61, 63, 65, 67, 69, |
@@ -176,7 +176,7 @@ static unsigned char red[256] = { | |||
176 | 220, 220, 221, 221 | 176 | 220, 220, 221, 221 |
177 | }; | 177 | }; |
178 | 178 | ||
179 | static unsigned char green[256] = { | 179 | static const unsigned char green[256] = { |
180 | 0, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, | 180 | 0, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, |
181 | 21, 21, 21, 21, 21, 21, 21, 28, 34, 39, 43, 47, | 181 | 21, 21, 21, 21, 21, 21, 21, 28, 34, 39, 43, 47, |
182 | 50, 53, 56, 59, 61, 64, 66, 68, 71, 73, 75, 77, | 182 | 50, 53, 56, 59, 61, 64, 66, 68, 71, 73, 75, 77, |
@@ -201,7 +201,7 @@ static unsigned char green[256] = { | |||
201 | 245, 245, 246, 246 | 201 | 245, 245, 246, 246 |
202 | }; | 202 | }; |
203 | 203 | ||
204 | static unsigned char blue[256] = { | 204 | static const unsigned char blue[256] = { |
205 | 0, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, | 205 | 0, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, |
206 | 23, 23, 23, 23, 23, 23, 23, 30, 37, 42, 47, 51, | 206 | 23, 23, 23, 23, 23, 23, 23, 30, 37, 42, 47, 51, |
207 | 55, 58, 61, 64, 67, 70, 72, 74, 78, 80, 82, 84, | 207 | 55, 58, 61, 64, 67, 70, 72, 74, 78, 80, 82, 84, |
diff --git a/drivers/usb/media/usbvideo.c b/drivers/usb/media/usbvideo.c index 24efb21969c6..af0585906b2e 100644 --- a/drivers/usb/media/usbvideo.c +++ b/drivers/usb/media/usbvideo.c | |||
@@ -955,7 +955,7 @@ static struct file_operations usbvideo_fops = { | |||
955 | .ioctl = usbvideo_v4l_ioctl, | 955 | .ioctl = usbvideo_v4l_ioctl, |
956 | .llseek = no_llseek, | 956 | .llseek = no_llseek, |
957 | }; | 957 | }; |
958 | static struct video_device usbvideo_template = { | 958 | static const struct video_device usbvideo_template = { |
959 | .owner = THIS_MODULE, | 959 | .owner = THIS_MODULE, |
960 | .type = VID_TYPE_CAPTURE, | 960 | .type = VID_TYPE_CAPTURE, |
961 | .hardware = VID_HARDWARE_CPIA, | 961 | .hardware = VID_HARDWARE_CPIA, |
diff --git a/drivers/usb/misc/sisusbvga/sisusb.c b/drivers/usb/misc/sisusbvga/sisusb.c index 1ced113ccb50..3260d595441f 100644 --- a/drivers/usb/misc/sisusbvga/sisusb.c +++ b/drivers/usb/misc/sisusbvga/sisusb.c | |||
@@ -2437,8 +2437,8 @@ sisusb_reset_text_mode(struct sisusb_usb_data *sisusb, int init) | |||
2437 | u8 *tempbuf; | 2437 | u8 *tempbuf; |
2438 | u16 *tempbufb; | 2438 | u16 *tempbufb; |
2439 | size_t written; | 2439 | size_t written; |
2440 | static char bootstring[] = "SiSUSB VGA text console, (C) 2005 Thomas Winischhofer."; | 2440 | static const char bootstring[] = "SiSUSB VGA text console, (C) 2005 Thomas Winischhofer."; |
2441 | static char bootlogo[] = "(o_ //\\ V_/_"; | 2441 | static const char bootlogo[] = "(o_ //\\ V_/_"; |
2442 | 2442 | ||
2443 | /* sisusb->lock is down */ | 2443 | /* sisusb->lock is down */ |
2444 | 2444 | ||
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 857fe791d702..11da073da178 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c | |||
@@ -491,7 +491,7 @@ static struct usb_driver ftdi_driver = { | |||
491 | .no_dynamic_id = 1, | 491 | .no_dynamic_id = 1, |
492 | }; | 492 | }; |
493 | 493 | ||
494 | static char *ftdi_chip_name[] = { | 494 | static const char *ftdi_chip_name[] = { |
495 | [SIO] = "SIO", /* the serial part of FT8U100AX */ | 495 | [SIO] = "SIO", /* the serial part of FT8U100AX */ |
496 | [FT8U232AM] = "FT8U232AM", | 496 | [FT8U232AM] = "FT8U232AM", |
497 | [FT232BM] = "FT232BM", | 497 | [FT232BM] = "FT232BM", |
diff --git a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c index 4e2b599d85a6..89bb3563c919 100644 --- a/drivers/usb/serial/io_edgeport.c +++ b/drivers/usb/serial/io_edgeport.c | |||
@@ -184,7 +184,7 @@ struct divisor_table_entry { | |||
184 | // These assume a 3.6864MHz crystal, the standard /16, and | 184 | // These assume a 3.6864MHz crystal, the standard /16, and |
185 | // MCR.7 = 0. | 185 | // MCR.7 = 0. |
186 | // | 186 | // |
187 | static struct divisor_table_entry divisor_table[] = { | 187 | static const struct divisor_table_entry divisor_table[] = { |
188 | { 50, 4608}, | 188 | { 50, 4608}, |
189 | { 75, 3072}, | 189 | { 75, 3072}, |
190 | { 110, 2095}, /* 2094.545455 => 230450 => .0217 % over */ | 190 | { 110, 2095}, /* 2094.545455 => 230450 => .0217 % over */ |
diff --git a/drivers/usb/serial/io_fw_boot2.h b/drivers/usb/serial/io_fw_boot2.h index c7c3a3c305fe..e3463de99de4 100644 --- a/drivers/usb/serial/io_fw_boot2.h +++ b/drivers/usb/serial/io_fw_boot2.h | |||
@@ -537,7 +537,7 @@ static unsigned char IMAGE_ARRAY_NAME[] = { | |||
537 | 537 | ||
538 | }; | 538 | }; |
539 | 539 | ||
540 | static struct edge_firmware_version_info IMAGE_VERSION_NAME = { | 540 | static const struct edge_firmware_version_info IMAGE_VERSION_NAME = { |
541 | 2, 0, 3 }; // Major, Minor, Build | 541 | 2, 0, 3 }; // Major, Minor, Build |
542 | 542 | ||
543 | #undef IMAGE_VERSION_NAME | 543 | #undef IMAGE_VERSION_NAME |
diff --git a/drivers/usb/serial/safe_serial.c b/drivers/usb/serial/safe_serial.c index 3ea284ce7b8b..86dc21c728a5 100644 --- a/drivers/usb/serial/safe_serial.c +++ b/drivers/usb/serial/safe_serial.c | |||
@@ -167,7 +167,7 @@ static struct usb_driver safe_driver = { | |||
167 | .no_dynamic_id = 1, | 167 | .no_dynamic_id = 1, |
168 | }; | 168 | }; |
169 | 169 | ||
170 | static __u16 crc10_table[256] = { | 170 | static const __u16 crc10_table[256] = { |
171 | 0x000, 0x233, 0x255, 0x066, 0x299, 0x0aa, 0x0cc, 0x2ff, 0x301, 0x132, 0x154, 0x367, 0x198, 0x3ab, 0x3cd, 0x1fe, | 171 | 0x000, 0x233, 0x255, 0x066, 0x299, 0x0aa, 0x0cc, 0x2ff, 0x301, 0x132, 0x154, 0x367, 0x198, 0x3ab, 0x3cd, 0x1fe, |
172 | 0x031, 0x202, 0x264, 0x057, 0x2a8, 0x09b, 0x0fd, 0x2ce, 0x330, 0x103, 0x165, 0x356, 0x1a9, 0x39a, 0x3fc, 0x1cf, | 172 | 0x031, 0x202, 0x264, 0x057, 0x2a8, 0x09b, 0x0fd, 0x2ce, 0x330, 0x103, 0x165, 0x356, 0x1a9, 0x39a, 0x3fc, 0x1cf, |
173 | 0x062, 0x251, 0x237, 0x004, 0x2fb, 0x0c8, 0x0ae, 0x29d, 0x363, 0x150, 0x136, 0x305, 0x1fa, 0x3c9, 0x3af, 0x19c, | 173 | 0x062, 0x251, 0x237, 0x004, 0x2fb, 0x0c8, 0x0ae, 0x29d, 0x363, 0x150, 0x136, 0x305, 0x1fa, 0x3c9, 0x3af, 0x19c, |
diff --git a/drivers/usb/storage/sddr09.c b/drivers/usb/storage/sddr09.c index 0ea2f5ab66ba..0a6efae452fb 100644 --- a/drivers/usb/storage/sddr09.c +++ b/drivers/usb/storage/sddr09.c | |||
@@ -237,7 +237,7 @@ static void nand_store_ecc(unsigned char *data, unsigned char *ecc) { | |||
237 | #define SPARE 0xfffffffe | 237 | #define SPARE 0xfffffffe |
238 | #define UNUSABLE 0xfffffffd | 238 | #define UNUSABLE 0xfffffffd |
239 | 239 | ||
240 | static int erase_bad_lba_entries = 0; | 240 | static const int erase_bad_lba_entries = 0; |
241 | 241 | ||
242 | /* send vendor interface command (0x41) */ | 242 | /* send vendor interface command (0x41) */ |
243 | /* called for requests 0, 1, 8 */ | 243 | /* called for requests 0, 1, 8 */ |
diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c index 484ed297bed0..356f471ba83b 100644 --- a/drivers/usb/storage/usb.c +++ b/drivers/usb/storage/usb.c | |||
@@ -470,7 +470,7 @@ static void get_device_info(struct us_data *us, const struct usb_device_id *id) | |||
470 | * from the unusual_devs.h table. | 470 | * from the unusual_devs.h table. |
471 | */ | 471 | */ |
472 | if (id->idVendor || id->idProduct) { | 472 | if (id->idVendor || id->idProduct) { |
473 | static char *msgs[3] = { | 473 | static const char *msgs[3] = { |
474 | "an unneeded SubClass entry", | 474 | "an unneeded SubClass entry", |
475 | "an unneeded Protocol entry", | 475 | "an unneeded Protocol entry", |
476 | "unneeded SubClass and Protocol entries"}; | 476 | "unneeded SubClass and Protocol entries"}; |