diff options
author | Jan Engelhardt <jengelh@medozas.de> | 2009-08-05 13:42:58 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-08-05 13:42:58 -0400 |
commit | 36cbd3dcc10384f813ec0814255f576c84f2bcd4 (patch) | |
tree | c3579edea972519d2f9ae99d7da9a5dd56e6f5c1 /net/irda/ircomm | |
parent | db71789c01ae7b641f83c5aa64e7df25122f4b28 (diff) |
net: mark read-only arrays as const
String literals are constant, and usually, we can also tag the array
of pointers const too, moving it to the .rodata section.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/irda/ircomm')
-rw-r--r-- | net/irda/ircomm/ircomm_event.c | 4 | ||||
-rw-r--r-- | net/irda/ircomm/ircomm_tty_attach.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/net/irda/ircomm/ircomm_event.c b/net/irda/ircomm/ircomm_event.c index c35b3ef5c2f0..d78554fedbac 100644 --- a/net/irda/ircomm/ircomm_event.c +++ b/net/irda/ircomm/ircomm_event.c | |||
@@ -49,7 +49,7 @@ static int ircomm_state_waitr(struct ircomm_cb *self, IRCOMM_EVENT event, | |||
49 | static int ircomm_state_conn(struct ircomm_cb *self, IRCOMM_EVENT event, | 49 | static int ircomm_state_conn(struct ircomm_cb *self, IRCOMM_EVENT event, |
50 | struct sk_buff *skb, struct ircomm_info *info); | 50 | struct sk_buff *skb, struct ircomm_info *info); |
51 | 51 | ||
52 | char *ircomm_state[] = { | 52 | const char *const ircomm_state[] = { |
53 | "IRCOMM_IDLE", | 53 | "IRCOMM_IDLE", |
54 | "IRCOMM_WAITI", | 54 | "IRCOMM_WAITI", |
55 | "IRCOMM_WAITR", | 55 | "IRCOMM_WAITR", |
@@ -57,7 +57,7 @@ char *ircomm_state[] = { | |||
57 | }; | 57 | }; |
58 | 58 | ||
59 | #ifdef CONFIG_IRDA_DEBUG | 59 | #ifdef CONFIG_IRDA_DEBUG |
60 | static char *ircomm_event[] = { | 60 | static const char *const ircomm_event[] = { |
61 | "IRCOMM_CONNECT_REQUEST", | 61 | "IRCOMM_CONNECT_REQUEST", |
62 | "IRCOMM_CONNECT_RESPONSE", | 62 | "IRCOMM_CONNECT_RESPONSE", |
63 | "IRCOMM_TTP_CONNECT_INDICATION", | 63 | "IRCOMM_TTP_CONNECT_INDICATION", |
diff --git a/net/irda/ircomm/ircomm_tty_attach.c b/net/irda/ircomm/ircomm_tty_attach.c index 9032a1d1190d..eafc010907c2 100644 --- a/net/irda/ircomm/ircomm_tty_attach.c +++ b/net/irda/ircomm/ircomm_tty_attach.c | |||
@@ -80,7 +80,7 @@ static int ircomm_tty_state_ready(struct ircomm_tty_cb *self, | |||
80 | struct sk_buff *skb, | 80 | struct sk_buff *skb, |
81 | struct ircomm_tty_info *info); | 81 | struct ircomm_tty_info *info); |
82 | 82 | ||
83 | char *ircomm_tty_state[] = { | 83 | const char *const ircomm_tty_state[] = { |
84 | "IRCOMM_TTY_IDLE", | 84 | "IRCOMM_TTY_IDLE", |
85 | "IRCOMM_TTY_SEARCH", | 85 | "IRCOMM_TTY_SEARCH", |
86 | "IRCOMM_TTY_QUERY_PARAMETERS", | 86 | "IRCOMM_TTY_QUERY_PARAMETERS", |
@@ -91,7 +91,7 @@ char *ircomm_tty_state[] = { | |||
91 | }; | 91 | }; |
92 | 92 | ||
93 | #ifdef CONFIG_IRDA_DEBUG | 93 | #ifdef CONFIG_IRDA_DEBUG |
94 | static char *ircomm_tty_event[] = { | 94 | static const char *const ircomm_tty_event[] = { |
95 | "IRCOMM_TTY_ATTACH_CABLE", | 95 | "IRCOMM_TTY_ATTACH_CABLE", |
96 | "IRCOMM_TTY_DETACH_CABLE", | 96 | "IRCOMM_TTY_DETACH_CABLE", |
97 | "IRCOMM_TTY_DATA_REQUEST", | 97 | "IRCOMM_TTY_DATA_REQUEST", |