aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorRakib Mullick <rakib.mullick@gmail.com>2009-12-09 15:34:18 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2010-03-02 17:43:13 -0500
commitc6fc826e4c51d2c54913c2a6d800159a2c7dac4b (patch)
tree8893631c55c4d028f8ef91f9dbfc33b9c829be21 /drivers/char
parentecfcbee729389bc47576695c529d351d60946ca7 (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.c17
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;
164static unsigned int moxaLowWaterChk; 164static unsigned int moxaLowWaterChk;
165static DEFINE_MUTEX(moxa_openlock); 165static DEFINE_MUTEX(moxa_openlock);
166static DEFINE_SPINLOCK(moxa_lock); 166static DEFINE_SPINLOCK(moxa_lock);
167/* Variables for insmod */ 167
168#ifdef MODULE
169static unsigned long baseaddr[MAX_BOARDS]; 168static unsigned long baseaddr[MAX_BOARDS];
170static unsigned int type[MAX_BOARDS]; 169static unsigned int type[MAX_BOARDS];
171static unsigned int numports[MAX_BOARDS]; 170static unsigned int numports[MAX_BOARDS];
172#endif
173 171
174MODULE_AUTHOR("William Chen"); 172MODULE_AUTHOR("William Chen");
175MODULE_DESCRIPTION("MOXA Intellio Family Multiport Board Device Driver"); 173MODULE_DESCRIPTION("MOXA Intellio Family Multiport Board Device Driver");
176MODULE_LICENSE("GPL"); 174MODULE_LICENSE("GPL");
177#ifdef MODULE 175
178module_param_array(type, uint, NULL, 0); 176module_param_array(type, uint, NULL, 0);
179MODULE_PARM_DESC(type, "card type: C218=2, C320=4"); 177MODULE_PARM_DESC(type, "card type: C218=2, C320=4");
180module_param_array(baseaddr, ulong, NULL, 0); 178module_param_array(baseaddr, ulong, NULL, 0);
181MODULE_PARM_DESC(baseaddr, "base address"); 179MODULE_PARM_DESC(baseaddr, "base address");
182module_param_array(numports, uint, NULL, 0); 180module_param_array(numports, uint, NULL, 0);
183MODULE_PARM_DESC(numports, "numports (ignored for C218)"); 181MODULE_PARM_DESC(numports, "numports (ignored for C218)");
184#endif 182
185module_param(ttymajor, int, 0); 183module_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);