diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2008-10-13 05:34:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-13 12:51:39 -0400 |
commit | cf176bc30289f1e3ed858bc7630766cbd7d68a86 (patch) | |
tree | 0e30dc91b288ce353aed0fc613ae5f4a6550d319 /drivers/char/ip2/ip2main.c | |
parent | 47babd4c6a16915aeb15d4216d91f03910572982 (diff) |
ip2: cleanup globals
- do not init .bss zeroed data to zero again (by memset or
explicit assignment)
- use char [] instead of char * for string constants
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char/ip2/ip2main.c')
-rw-r--r-- | drivers/char/ip2/ip2main.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/drivers/char/ip2/ip2main.c b/drivers/char/ip2/ip2main.c index 79bca611d429..1d4628499641 100644 --- a/drivers/char/ip2/ip2main.c +++ b/drivers/char/ip2/ip2main.c | |||
@@ -150,12 +150,12 @@ static int ip2_read_proc(char *, char **, off_t, int, int *, void * ); | |||
150 | /*************/ | 150 | /*************/ |
151 | 151 | ||
152 | /* String constants to identify ourselves */ | 152 | /* String constants to identify ourselves */ |
153 | static char *pcName = "Computone IntelliPort Plus multiport driver"; | 153 | static const char pcName[] = "Computone IntelliPort Plus multiport driver"; |
154 | static char *pcVersion = "1.2.14"; | 154 | static const char pcVersion[] = "1.2.14"; |
155 | 155 | ||
156 | /* String constants for port names */ | 156 | /* String constants for port names */ |
157 | static char *pcDriver_name = "ip2"; | 157 | static const char pcDriver_name[] = "ip2"; |
158 | static char *pcIpl = "ip2ipl"; | 158 | static const char pcIpl[] = "ip2ipl"; |
159 | 159 | ||
160 | /***********************/ | 160 | /***********************/ |
161 | /* Function Prototypes */ | 161 | /* Function Prototypes */ |
@@ -237,8 +237,8 @@ static const struct file_operations ip2_ipl = { | |||
237 | .open = ip2_ipl_open, | 237 | .open = ip2_ipl_open, |
238 | }; | 238 | }; |
239 | 239 | ||
240 | static unsigned long irq_counter = 0; | 240 | static unsigned long irq_counter; |
241 | static unsigned long bh_counter = 0; | 241 | static unsigned long bh_counter; |
242 | 242 | ||
243 | // Use immediate queue to service interrupts | 243 | // Use immediate queue to service interrupts |
244 | #define USE_IQI | 244 | #define USE_IQI |
@@ -286,7 +286,7 @@ MODULE_AUTHOR("Doug McNash"); | |||
286 | MODULE_DESCRIPTION("Computone IntelliPort Plus Driver"); | 286 | MODULE_DESCRIPTION("Computone IntelliPort Plus Driver"); |
287 | MODULE_LICENSE("GPL"); | 287 | MODULE_LICENSE("GPL"); |
288 | 288 | ||
289 | static int poll_only = 0; | 289 | static int poll_only; |
290 | 290 | ||
291 | static int Eisa_irq; | 291 | static int Eisa_irq; |
292 | static int Eisa_slot; | 292 | static int Eisa_slot; |
@@ -615,10 +615,6 @@ static int ip2_loadmain(void) | |||
615 | /* Initialise the iiEllis subsystem. */ | 615 | /* Initialise the iiEllis subsystem. */ |
616 | iiEllisInit(); | 616 | iiEllisInit(); |
617 | 617 | ||
618 | /* Initialize arrays. */ | ||
619 | memset( i2BoardPtrTable, 0, sizeof i2BoardPtrTable ); | ||
620 | memset( DevTable, 0, sizeof DevTable ); | ||
621 | |||
622 | /* Initialise all the boards we can find (up to the maximum). */ | 618 | /* Initialise all the boards we can find (up to the maximum). */ |
623 | for ( i = 0; i < IP2_MAX_BOARDS; ++i ) { | 619 | for ( i = 0; i < IP2_MAX_BOARDS; ++i ) { |
624 | switch ( ip2config.addr[i] ) { | 620 | switch ( ip2config.addr[i] ) { |