aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2005-10-30 18:03:14 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-10-30 20:37:27 -0500
commitd269cdd0e22ef22f7f597ea917b1e8bdc6999fcb (patch)
tree193eef7d8aaac1d92af7c8101bdc0ee4a88e3a5c
parent708f430dcc50787d1c0b5c31962a5ff0dd8e35eb (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>
-rw-r--r--drivers/char/rocket.c10
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,
256static int sReadAiopID(ByteIO_t io); 256static int sReadAiopID(ByteIO_t io);
257static int sReadAiopNumChan(WordIO_t io); 257static int sReadAiopNumChan(WordIO_t io);
258 258
259#ifdef MODULE
260MODULE_AUTHOR("Theodore Ts'o"); 259MODULE_AUTHOR("Theodore Ts'o");
261MODULE_DESCRIPTION("Comtrol RocketPort driver"); 260MODULE_DESCRIPTION("Comtrol RocketPort driver");
262module_param(board1, ulong, 0); 261module_param(board1, ulong, 0);
@@ -288,17 +287,14 @@ MODULE_PARM_DESC(pc104_3, "set interface types for ISA(PC104) board #3 (e.g. pc1
288module_param_array(pc104_4, ulong, NULL, 0); 287module_param_array(pc104_4, ulong, NULL, 0);
289MODULE_PARM_DESC(pc104_4, "set interface types for ISA(PC104) board #4 (e.g. pc104_4=232,232,485,485,..."); 288MODULE_PARM_DESC(pc104_4, "set interface types for ISA(PC104) board #4 (e.g. pc104_4=232,232,485,485,...");
290 289
291int rp_init(void); 290static int rp_init(void);
292static void rp_cleanup_module(void); 291static void rp_cleanup_module(void);
293 292
294module_init(rp_init); 293module_init(rp_init);
295module_exit(rp_cleanup_module); 294module_exit(rp_cleanup_module);
296 295
297#endif
298 296
299#ifdef MODULE_LICENSE
300MODULE_LICENSE("Dual BSD/GPL"); 297MODULE_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 */
2381int __init rp_init(void) 2377static 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
2507static void rp_cleanup_module(void) 2502static 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/***************************************************************************
2536Function: sInitController 2530Function: sInitController