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

USB: serial: constify static arrays

Declare three immutable static driver arrays as const.

Signed-off-by: Johan Hovold <johan@kernel.org>

+5 -5
+3 -3
drivers/usb/serial/io_edgeport.c
··· 2839 2839 bool interrupt_in_found; 2840 2840 bool bulk_in_found; 2841 2841 bool bulk_out_found; 2842 - static __u32 descriptor[3] = { EDGE_COMPATIBILITY_MASK0, 2843 - EDGE_COMPATIBILITY_MASK1, 2844 - EDGE_COMPATIBILITY_MASK2 }; 2842 + static const __u32 descriptor[3] = { EDGE_COMPATIBILITY_MASK0, 2843 + EDGE_COMPATIBILITY_MASK1, 2844 + EDGE_COMPATIBILITY_MASK2 }; 2845 2845 2846 2846 dev = serial->dev; 2847 2847
+1 -1
drivers/usb/serial/mos7720.c
··· 1408 1408 /* Define table of divisors for moschip 7720 hardware * 1409 1409 * These assume a 3.6864MHz crystal, the standard /16, and * 1410 1410 * MCR.7 = 0. */ 1411 - static struct divisor_table_entry divisor_table[] = { 1411 + static const struct divisor_table_entry divisor_table[] = { 1412 1412 { 50, 2304}, 1413 1413 { 110, 1047}, /* 2094.545455 => 230450 => .0217 % over */ 1414 1414 { 134, 857}, /* 1713.011152 => 230398.5 => .00065% under */
+1 -1
drivers/usb/serial/usb_debug.c
··· 17 17 18 18 #define USB_DEBUG_MAX_PACKET_SIZE 8 19 19 #define USB_DEBUG_BRK_SIZE 8 20 - static char USB_DEBUG_BRK[USB_DEBUG_BRK_SIZE] = { 20 + static const char USB_DEBUG_BRK[USB_DEBUG_BRK_SIZE] = { 21 21 0x00, 22 22 0xff, 23 23 0x01,