diff options
author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2005-10-30 18:03:14 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-30 20:37:27 -0500 |
commit | d269cdd0e22ef22f7f597ea917b1e8bdc6999fcb (patch) | |
tree | 193eef7d8aaac1d92af7c8101bdc0ee4a88e3a5c /drivers/char | |
parent | 708f430dcc50787d1c0b5c31962a5ff0dd8e35eb (diff) |
[PATCH] rocketport: make it work when statically linked into kernel
The driver had incorrectly wrapped module_init(rp_init) in #ifdef MODULE,
so it worked only when compiled as a module.
Tested by Wolfgang Denk with this device:
00:0e.0 Communication controller: Comtrol Corporation RocketPort 8 port w/RJ11 connectors (rev 04)
Control: I/O+ Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B- ParErr- DEVSEL=slow >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Interrupt: pin A routed to IRQ 11
Region 0: I/O ports at 7000 [size=64]
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/rocket.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/char/rocket.c b/drivers/char/rocket.c index 5b1d3680c8ab..928b850cc679 100644 --- a/drivers/char/rocket.c +++ b/drivers/char/rocket.c | |||
@@ -256,7 +256,6 @@ static int sInitController(CONTROLLER_T * CtlP, int CtlNum, ByteIO_t MudbacIO, | |||
256 | static int sReadAiopID(ByteIO_t io); | 256 | static int sReadAiopID(ByteIO_t io); |
257 | static int sReadAiopNumChan(WordIO_t io); | 257 | static int sReadAiopNumChan(WordIO_t io); |
258 | 258 | ||
259 | #ifdef MODULE | ||
260 | MODULE_AUTHOR("Theodore Ts'o"); | 259 | MODULE_AUTHOR("Theodore Ts'o"); |
261 | MODULE_DESCRIPTION("Comtrol RocketPort driver"); | 260 | MODULE_DESCRIPTION("Comtrol RocketPort driver"); |
262 | module_param(board1, ulong, 0); | 261 | module_param(board1, ulong, 0); |
@@ -288,17 +287,14 @@ MODULE_PARM_DESC(pc104_3, "set interface types for ISA(PC104) board #3 (e.g. pc1 | |||
288 | module_param_array(pc104_4, ulong, NULL, 0); | 287 | module_param_array(pc104_4, ulong, NULL, 0); |
289 | MODULE_PARM_DESC(pc104_4, "set interface types for ISA(PC104) board #4 (e.g. pc104_4=232,232,485,485,..."); | 288 | MODULE_PARM_DESC(pc104_4, "set interface types for ISA(PC104) board #4 (e.g. pc104_4=232,232,485,485,..."); |
290 | 289 | ||
291 | int rp_init(void); | 290 | static int rp_init(void); |
292 | static void rp_cleanup_module(void); | 291 | static void rp_cleanup_module(void); |
293 | 292 | ||
294 | module_init(rp_init); | 293 | module_init(rp_init); |
295 | module_exit(rp_cleanup_module); | 294 | module_exit(rp_cleanup_module); |
296 | 295 | ||
297 | #endif | ||
298 | 296 | ||
299 | #ifdef MODULE_LICENSE | ||
300 | MODULE_LICENSE("Dual BSD/GPL"); | 297 | MODULE_LICENSE("Dual BSD/GPL"); |
301 | #endif | ||
302 | 298 | ||
303 | /*************************************************************************/ | 299 | /*************************************************************************/ |
304 | /* Module code starts here */ | 300 | /* Module code starts here */ |
@@ -2378,7 +2374,7 @@ static struct tty_operations rocket_ops = { | |||
2378 | /* | 2374 | /* |
2379 | * The module "startup" routine; it's run when the module is loaded. | 2375 | * The module "startup" routine; it's run when the module is loaded. |
2380 | */ | 2376 | */ |
2381 | int __init rp_init(void) | 2377 | static int __init rp_init(void) |
2382 | { | 2378 | { |
2383 | int retval, pci_boards_found, isa_boards_found, i; | 2379 | int retval, pci_boards_found, isa_boards_found, i; |
2384 | 2380 | ||
@@ -2502,7 +2498,6 @@ int __init rp_init(void) | |||
2502 | return 0; | 2498 | return 0; |
2503 | } | 2499 | } |
2504 | 2500 | ||
2505 | #ifdef MODULE | ||
2506 | 2501 | ||
2507 | static void rp_cleanup_module(void) | 2502 | static void rp_cleanup_module(void) |
2508 | { | 2503 | { |
@@ -2530,7 +2525,6 @@ static void rp_cleanup_module(void) | |||
2530 | if (controller) | 2525 | if (controller) |
2531 | release_region(controller, 4); | 2526 | release_region(controller, 4); |
2532 | } | 2527 | } |
2533 | #endif | ||
2534 | 2528 | ||
2535 | /*************************************************************************** | 2529 | /*************************************************************************** |
2536 | Function: sInitController | 2530 | Function: sInitController |