diff options
Diffstat (limited to 'drivers/char/cyclades.c')
-rw-r--r-- | drivers/char/cyclades.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c index 4254457d3911..9824b4162904 100644 --- a/drivers/char/cyclades.c +++ b/drivers/char/cyclades.c | |||
@@ -79,6 +79,7 @@ | |||
79 | #include <linux/bitops.h> | 79 | #include <linux/bitops.h> |
80 | #include <linux/firmware.h> | 80 | #include <linux/firmware.h> |
81 | #include <linux/device.h> | 81 | #include <linux/device.h> |
82 | #include <linux/slab.h> | ||
82 | 83 | ||
83 | #include <linux/io.h> | 84 | #include <linux/io.h> |
84 | #include <linux/uaccess.h> | 85 | #include <linux/uaccess.h> |
@@ -158,13 +159,11 @@ static unsigned int cy_isa_addresses[] = { | |||
158 | 159 | ||
159 | #define NR_ISA_ADDRS ARRAY_SIZE(cy_isa_addresses) | 160 | #define NR_ISA_ADDRS ARRAY_SIZE(cy_isa_addresses) |
160 | 161 | ||
161 | #ifdef MODULE | ||
162 | static long maddr[NR_CARDS]; | 162 | static long maddr[NR_CARDS]; |
163 | static int irq[NR_CARDS]; | 163 | static int irq[NR_CARDS]; |
164 | 164 | ||
165 | module_param_array(maddr, long, NULL, 0); | 165 | module_param_array(maddr, long, NULL, 0); |
166 | module_param_array(irq, int, NULL, 0); | 166 | module_param_array(irq, int, NULL, 0); |
167 | #endif | ||
168 | 167 | ||
169 | #endif /* CONFIG_ISA */ | 168 | #endif /* CONFIG_ISA */ |
170 | 169 | ||
@@ -598,12 +597,6 @@ static void cyy_chip_tx(struct cyclades_card *cinfo, unsigned int chip, | |||
598 | save_car = readb(base_addr + (CyCAR << index)); | 597 | save_car = readb(base_addr + (CyCAR << index)); |
599 | cy_writeb(base_addr + (CyCAR << index), save_xir); | 598 | cy_writeb(base_addr + (CyCAR << index), save_xir); |
600 | 599 | ||
601 | /* validate the port# (as configured and open) */ | ||
602 | if (channel + chip * 4 >= cinfo->nports) { | ||
603 | cy_writeb(base_addr + (CySRER << index), | ||
604 | readb(base_addr + (CySRER << index)) & ~CyTxRdy); | ||
605 | goto end; | ||
606 | } | ||
607 | info = &cinfo->ports[channel + chip * 4]; | 600 | info = &cinfo->ports[channel + chip * 4]; |
608 | tty = tty_port_tty_get(&info->port); | 601 | tty = tty_port_tty_get(&info->port); |
609 | if (tty == NULL) { | 602 | if (tty == NULL) { |
@@ -3316,13 +3309,10 @@ static int __init cy_detect_isa(void) | |||
3316 | unsigned short cy_isa_irq, nboard; | 3309 | unsigned short cy_isa_irq, nboard; |
3317 | void __iomem *cy_isa_address; | 3310 | void __iomem *cy_isa_address; |
3318 | unsigned short i, j, cy_isa_nchan; | 3311 | unsigned short i, j, cy_isa_nchan; |
3319 | #ifdef MODULE | ||
3320 | int isparam = 0; | 3312 | int isparam = 0; |
3321 | #endif | ||
3322 | 3313 | ||
3323 | nboard = 0; | 3314 | nboard = 0; |
3324 | 3315 | ||
3325 | #ifdef MODULE | ||
3326 | /* Check for module parameters */ | 3316 | /* Check for module parameters */ |
3327 | for (i = 0; i < NR_CARDS; i++) { | 3317 | for (i = 0; i < NR_CARDS; i++) { |
3328 | if (maddr[i] || i) { | 3318 | if (maddr[i] || i) { |
@@ -3332,7 +3322,6 @@ static int __init cy_detect_isa(void) | |||
3332 | if (!maddr[i]) | 3322 | if (!maddr[i]) |
3333 | break; | 3323 | break; |
3334 | } | 3324 | } |
3335 | #endif | ||
3336 | 3325 | ||
3337 | /* scan the address table probing for Cyclom-Y/ISA boards */ | 3326 | /* scan the address table probing for Cyclom-Y/ISA boards */ |
3338 | for (i = 0; i < NR_ISA_ADDRS; i++) { | 3327 | for (i = 0; i < NR_ISA_ADDRS; i++) { |
@@ -3353,11 +3342,10 @@ static int __init cy_detect_isa(void) | |||
3353 | iounmap(cy_isa_address); | 3342 | iounmap(cy_isa_address); |
3354 | continue; | 3343 | continue; |
3355 | } | 3344 | } |
3356 | #ifdef MODULE | 3345 | |
3357 | if (isparam && i < NR_CARDS && irq[i]) | 3346 | if (isparam && i < NR_CARDS && irq[i]) |
3358 | cy_isa_irq = irq[i]; | 3347 | cy_isa_irq = irq[i]; |
3359 | else | 3348 | else |
3360 | #endif | ||
3361 | /* find out the board's irq by probing */ | 3349 | /* find out the board's irq by probing */ |
3362 | cy_isa_irq = detect_isa_irq(cy_isa_address); | 3350 | cy_isa_irq = detect_isa_irq(cy_isa_address); |
3363 | if (cy_isa_irq == 0) { | 3351 | if (cy_isa_irq == 0) { |
@@ -4208,3 +4196,4 @@ module_exit(cy_cleanup_module); | |||
4208 | MODULE_LICENSE("GPL"); | 4196 | MODULE_LICENSE("GPL"); |
4209 | MODULE_VERSION(CY_VERSION); | 4197 | MODULE_VERSION(CY_VERSION); |
4210 | MODULE_ALIAS_CHARDEV_MAJOR(CYCLADES_MAJOR); | 4198 | MODULE_ALIAS_CHARDEV_MAJOR(CYCLADES_MAJOR); |
4199 | MODULE_FIRMWARE("cyzfirm.bin"); | ||