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/usb/serial | |
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/usb/serial')
-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 |
4 files changed, 4 insertions, 4 deletions
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, |