diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2006-12-08 05:39:02 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-08 11:28:58 -0500 |
commit | 927a6f9dd0d0b5f70cb2e0799ce7a3844f43d42f (patch) | |
tree | 6e0979ebbce733d1b3fa0747c52d0f48794233c9 /drivers | |
parent | 18f813ee693eaf51ad313020b725b118a891c3ee (diff) |
[PATCH] Char: sx, ifdef ISA code
Most users won't need old probe code -- make it depndent on CONFIG_(E)ISA.
Cc: <R.E.Wolff@BitWizard.nl>
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/sx.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/drivers/char/sx.c b/drivers/char/sx.c index ca3145a440b7..50cd64262a13 100644 --- a/drivers/char/sx.c +++ b/drivers/char/sx.c | |||
@@ -323,6 +323,8 @@ static int sx_slowpoll; | |||
323 | 323 | ||
324 | static int sx_maxints = 100; | 324 | static int sx_maxints = 100; |
325 | 325 | ||
326 | #ifdef CONFIG_ISA | ||
327 | |||
326 | /* These are the only open spaces in my computer. Yours may have more | 328 | /* These are the only open spaces in my computer. Yours may have more |
327 | or less.... -- REW | 329 | or less.... -- REW |
328 | duh: Card at 0xa0000 is possible on HP Netserver?? -- pvdl | 330 | duh: Card at 0xa0000 is possible on HP Netserver?? -- pvdl |
@@ -337,13 +339,14 @@ static int si1_probe_addrs[]= { 0xd0000}; | |||
337 | #define NR_SI_ADDRS ARRAY_SIZE(si_probe_addrs) | 339 | #define NR_SI_ADDRS ARRAY_SIZE(si_probe_addrs) |
338 | #define NR_SI1_ADDRS ARRAY_SIZE(si1_probe_addrs) | 340 | #define NR_SI1_ADDRS ARRAY_SIZE(si1_probe_addrs) |
339 | 341 | ||
342 | module_param_array(sx_probe_addrs, int, NULL, 0); | ||
343 | module_param_array(si_probe_addrs, int, NULL, 0); | ||
344 | #endif | ||
340 | 345 | ||
341 | /* Set the mask to all-ones. This alas, only supports 32 interrupts. | 346 | /* Set the mask to all-ones. This alas, only supports 32 interrupts. |
342 | Some architectures may need more. */ | 347 | Some architectures may need more. */ |
343 | static int sx_irqmask = -1; | 348 | static int sx_irqmask = -1; |
344 | 349 | ||
345 | module_param_array(sx_probe_addrs, int, NULL, 0); | ||
346 | module_param_array(si_probe_addrs, int, NULL, 0); | ||
347 | module_param(sx_poll, int, 0); | 350 | module_param(sx_poll, int, 0); |
348 | module_param(sx_slowpoll, int, 0); | 351 | module_param(sx_slowpoll, int, 0); |
349 | module_param(sx_maxints, int, 0); | 352 | module_param(sx_maxints, int, 0); |
@@ -2118,7 +2121,7 @@ static int __devinit probe_sx (struct sx_board *board) | |||
2118 | return 1; | 2121 | return 1; |
2119 | } | 2122 | } |
2120 | 2123 | ||
2121 | 2124 | #if defined(CONFIG_ISA) || defined(CONFIG_EISA) | |
2122 | 2125 | ||
2123 | /* Specialix probes for this card at 32k increments from 640k to 16M. | 2126 | /* Specialix probes for this card at 32k increments from 640k to 16M. |
2124 | I consider machines with less than 16M unlikely nowadays, so I'm | 2127 | I consider machines with less than 16M unlikely nowadays, so I'm |
@@ -2213,6 +2216,7 @@ static int __devinit probe_si (struct sx_board *board) | |||
2213 | func_exit(); | 2216 | func_exit(); |
2214 | return 1; | 2217 | return 1; |
2215 | } | 2218 | } |
2219 | #endif | ||
2216 | 2220 | ||
2217 | static const struct tty_operations sx_ops = { | 2221 | static const struct tty_operations sx_ops = { |
2218 | .break_ctl = sx_break, | 2222 | .break_ctl = sx_break, |
@@ -2576,9 +2580,12 @@ static int __init sx_init(void) | |||
2576 | #ifdef CONFIG_EISA | 2580 | #ifdef CONFIG_EISA |
2577 | int retval1; | 2581 | int retval1; |
2578 | #endif | 2582 | #endif |
2579 | int retval, i; | 2583 | #ifdef CONFIG_ISA |
2580 | int found = 0; | ||
2581 | struct sx_board *board; | 2584 | struct sx_board *board; |
2585 | unsigned int i; | ||
2586 | #endif | ||
2587 | unsigned int found = 0; | ||
2588 | int retval; | ||
2582 | 2589 | ||
2583 | func_enter(); | 2590 | func_enter(); |
2584 | sx_dprintk (SX_DEBUG_INIT, "Initing sx module... (sx_debug=%d)\n", sx_debug); | 2591 | sx_dprintk (SX_DEBUG_INIT, "Initing sx module... (sx_debug=%d)\n", sx_debug); |
@@ -2593,7 +2600,7 @@ static int __init sx_init(void) | |||
2593 | printk(KERN_ERR "SX: Unable to register firmware loader driver.\n"); | 2600 | printk(KERN_ERR "SX: Unable to register firmware loader driver.\n"); |
2594 | return -EIO; | 2601 | return -EIO; |
2595 | } | 2602 | } |
2596 | 2603 | #ifdef CONFIG_ISA | |
2597 | for (i=0;i<NR_SX_ADDRS;i++) { | 2604 | for (i=0;i<NR_SX_ADDRS;i++) { |
2598 | board = &boards[found]; | 2605 | board = &boards[found]; |
2599 | board->hw_base = sx_probe_addrs[i]; | 2606 | board->hw_base = sx_probe_addrs[i]; |
@@ -2640,6 +2647,7 @@ static int __init sx_init(void) | |||
2640 | iounmap (board->base); | 2647 | iounmap (board->base); |
2641 | } | 2648 | } |
2642 | } | 2649 | } |
2650 | #endif | ||
2643 | #ifdef CONFIG_EISA | 2651 | #ifdef CONFIG_EISA |
2644 | retval1 = eisa_driver_register(&sx_eisadriver); | 2652 | retval1 = eisa_driver_register(&sx_eisadriver); |
2645 | #endif | 2653 | #endif |