diff options
author | Rakib Mullick <rakib.mullick@gmail.com> | 2009-12-09 15:34:18 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-03-02 17:43:13 -0500 |
commit | c6fc826e4c51d2c54913c2a6d800159a2c7dac4b (patch) | |
tree | 8893631c55c4d028f8ef91f9dbfc33b9c829be21 /drivers/char | |
parent | ecfcbee729389bc47576695c529d351d60946ca7 (diff) |
tty: moxa: remove #ifdef MODULE completely.
We can pass "module parameters" on the kernel command line even when
!MODULE. So, #ifdef MODULE becomes obsolete. Also move the declaration
moxa_board_conf at the start of the function, since we were hit by the
following warning.
drivers/char/moxa.c: In function `moxa_init':
drivers/char/moxa.c:1040: warning: ISO C90 forbids mixed declarations and code
Signed-off-by: Rakib Mullick<rakib.mullick@gmail.com>
Acked-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/moxa.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/drivers/char/moxa.c b/drivers/char/moxa.c index 63ee3bbc1ce4..49a1fc2ec6f2 100644 --- a/drivers/char/moxa.c +++ b/drivers/char/moxa.c | |||
@@ -164,24 +164,22 @@ static unsigned int moxaFuncTout = HZ / 2; | |||
164 | static unsigned int moxaLowWaterChk; | 164 | static unsigned int moxaLowWaterChk; |
165 | static DEFINE_MUTEX(moxa_openlock); | 165 | static DEFINE_MUTEX(moxa_openlock); |
166 | static DEFINE_SPINLOCK(moxa_lock); | 166 | static DEFINE_SPINLOCK(moxa_lock); |
167 | /* Variables for insmod */ | 167 | |
168 | #ifdef MODULE | ||
169 | static unsigned long baseaddr[MAX_BOARDS]; | 168 | static unsigned long baseaddr[MAX_BOARDS]; |
170 | static unsigned int type[MAX_BOARDS]; | 169 | static unsigned int type[MAX_BOARDS]; |
171 | static unsigned int numports[MAX_BOARDS]; | 170 | static unsigned int numports[MAX_BOARDS]; |
172 | #endif | ||
173 | 171 | ||
174 | MODULE_AUTHOR("William Chen"); | 172 | MODULE_AUTHOR("William Chen"); |
175 | MODULE_DESCRIPTION("MOXA Intellio Family Multiport Board Device Driver"); | 173 | MODULE_DESCRIPTION("MOXA Intellio Family Multiport Board Device Driver"); |
176 | MODULE_LICENSE("GPL"); | 174 | MODULE_LICENSE("GPL"); |
177 | #ifdef MODULE | 175 | |
178 | module_param_array(type, uint, NULL, 0); | 176 | module_param_array(type, uint, NULL, 0); |
179 | MODULE_PARM_DESC(type, "card type: C218=2, C320=4"); | 177 | MODULE_PARM_DESC(type, "card type: C218=2, C320=4"); |
180 | module_param_array(baseaddr, ulong, NULL, 0); | 178 | module_param_array(baseaddr, ulong, NULL, 0); |
181 | MODULE_PARM_DESC(baseaddr, "base address"); | 179 | MODULE_PARM_DESC(baseaddr, "base address"); |
182 | module_param_array(numports, uint, NULL, 0); | 180 | module_param_array(numports, uint, NULL, 0); |
183 | MODULE_PARM_DESC(numports, "numports (ignored for C218)"); | 181 | MODULE_PARM_DESC(numports, "numports (ignored for C218)"); |
184 | #endif | 182 | |
185 | module_param(ttymajor, int, 0); | 183 | module_param(ttymajor, int, 0); |
186 | 184 | ||
187 | /* | 185 | /* |
@@ -1024,6 +1022,8 @@ static int __init moxa_init(void) | |||
1024 | { | 1022 | { |
1025 | unsigned int isabrds = 0; | 1023 | unsigned int isabrds = 0; |
1026 | int retval = 0; | 1024 | int retval = 0; |
1025 | struct moxa_board_conf *brd = moxa_boards; | ||
1026 | unsigned int i; | ||
1027 | 1027 | ||
1028 | printk(KERN_INFO "MOXA Intellio family driver version %s\n", | 1028 | printk(KERN_INFO "MOXA Intellio family driver version %s\n", |
1029 | MOXA_VERSION); | 1029 | MOXA_VERSION); |
@@ -1051,10 +1051,7 @@ static int __init moxa_init(void) | |||
1051 | } | 1051 | } |
1052 | 1052 | ||
1053 | /* Find the boards defined from module args. */ | 1053 | /* Find the boards defined from module args. */ |
1054 | #ifdef MODULE | 1054 | |
1055 | { | ||
1056 | struct moxa_board_conf *brd = moxa_boards; | ||
1057 | unsigned int i; | ||
1058 | for (i = 0; i < MAX_BOARDS; i++) { | 1055 | for (i = 0; i < MAX_BOARDS; i++) { |
1059 | if (!baseaddr[i]) | 1056 | if (!baseaddr[i]) |
1060 | break; | 1057 | break; |
@@ -1087,8 +1084,6 @@ static int __init moxa_init(void) | |||
1087 | isabrds++; | 1084 | isabrds++; |
1088 | } | 1085 | } |
1089 | } | 1086 | } |
1090 | } | ||
1091 | #endif | ||
1092 | 1087 | ||
1093 | #ifdef CONFIG_PCI | 1088 | #ifdef CONFIG_PCI |
1094 | retval = pci_register_driver(&moxa_pci_driver); | 1089 | retval = pci_register_driver(&moxa_pci_driver); |