summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2017-04-18 14:42:28 +0200
committerJohan Hovold <johan@kernel.org>2017-04-19 09:45:43 +0200
commit4f37fa549d0de7aee547783752e70f877a49b0c9 (patch)
tree298be91a12e0e9dbe5a9e82b34b5d86657aa32b1
parent185fcb3fbe6d32d894b8b72429622d91c59b10f6 (diff)
USB: serial: constify static arrays
Declare three immutable static driver arrays as const. Signed-off-by: Johan Hovold <johan@kernel.org>
-rw-r--r--drivers/usb/serial/io_edgeport.c6
-rw-r--r--drivers/usb/serial/mos7720.c2
-rw-r--r--drivers/usb/serial/usb_debug.c2
3 files changed, 5 insertions, 5 deletions
diff --git a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c
index e5d6265eac6e..bdf8bd814a9a 100644
--- a/drivers/usb/serial/io_edgeport.c
+++ b/drivers/usb/serial/io_edgeport.c
@@ -2839,9 +2839,9 @@ static int edge_startup(struct usb_serial *serial)
bool interrupt_in_found;
bool bulk_in_found;
bool bulk_out_found;
- static __u32 descriptor[3] = { EDGE_COMPATIBILITY_MASK0,
- EDGE_COMPATIBILITY_MASK1,
- EDGE_COMPATIBILITY_MASK2 };
+ static const __u32 descriptor[3] = { EDGE_COMPATIBILITY_MASK0,
+ EDGE_COMPATIBILITY_MASK1,
+ EDGE_COMPATIBILITY_MASK2 };
dev = serial->dev;
diff --git a/drivers/usb/serial/mos7720.c b/drivers/usb/serial/mos7720.c
index c3a314d5bdc6..a453965f9e9a 100644
--- a/drivers/usb/serial/mos7720.c
+++ b/drivers/usb/serial/mos7720.c
@@ -1408,7 +1408,7 @@ struct divisor_table_entry {
/* Define table of divisors for moschip 7720 hardware *
* These assume a 3.6864MHz crystal, the standard /16, and *
* MCR.7 = 0. */
-static struct divisor_table_entry divisor_table[] = {
+static const struct divisor_table_entry divisor_table[] = {
{ 50, 2304},
{ 110, 1047}, /* 2094.545455 => 230450 => .0217 % over */
{ 134, 857}, /* 1713.011152 => 230398.5 => .00065% under */
diff --git a/drivers/usb/serial/usb_debug.c b/drivers/usb/serial/usb_debug.c
index ca2fa5bbe17e..d210eff4cd33 100644
--- a/drivers/usb/serial/usb_debug.c
+++ b/drivers/usb/serial/usb_debug.c
@@ -17,7 +17,7 @@
#define USB_DEBUG_MAX_PACKET_SIZE 8
#define USB_DEBUG_BRK_SIZE 8
-static char USB_DEBUG_BRK[USB_DEBUG_BRK_SIZE] = {
+static const char USB_DEBUG_BRK[USB_DEBUG_BRK_SIZE] = {
0x00,
0xff,
0x01,