summaryrefslogtreecommitdiff
path: root/drivers/char/ip2.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2003-09-23 09:43:28 -0700
committerLinus Torvalds <torvalds@home.osdl.org>2003-09-23 09:43:28 -0700
commitf751e52a867c5092ebbb0d9f3402eb476df3135f (patch)
tree895d20c56934f3a659ffaf4c04cd37c336156e3d /drivers/char/ip2.c
parent905f90fe27a234815bb29fa850af396c537c5960 (diff)
[PATCH] switch remaining serial drivers to initcalls
From: Christoph Hellwig <hch@lst.de> All drivers that compile on ppc with CONFIG_ISA set (= all but some m68-only drivers), I looked at the compile warnings very closely and there are no new warnings or even errors this time :) drivers/char/Makefile needed to be reordered big time to keep the intialization order the same.
Diffstat (limited to 'drivers/char/ip2.c')
-rw-r--r--drivers/char/ip2.c48
1 files changed, 4 insertions, 44 deletions
diff --git a/drivers/char/ip2.c b/drivers/char/ip2.c
index 28aefc023688..8e62d6d3d6e9 100644
--- a/drivers/char/ip2.c
+++ b/drivers/char/ip2.c
@@ -34,8 +34,6 @@ ip2_loadmain(int *, int *, unsigned char *, int ); // ref into ip2main.c
static int io[IP2_MAX_BOARDS]= { 0, 0, 0, 0 };
static int irq[IP2_MAX_BOARDS] = { -1, -1, -1, -1 };
-#ifdef MODULE
-
static int poll_only = 0;
MODULE_AUTHOR("Doug McNash");
@@ -48,48 +46,20 @@ MODULE_PARM(poll_only,"1i");
MODULE_PARM_DESC(poll_only,"Do not use card interrupts");
-//======================================================================
-int
-init_module(void)
+static int __init ip2_init(void)
{
- int rc;
-
- MOD_INC_USE_COUNT; // hold till done
-
if( poll_only ) {
/* Hard lock the interrupts to zero */
irq[0] = irq[1] = irq[2] = irq[3] = 0;
}
- rc = ip2_loadmain(io,irq,(unsigned char *)fip_firm,sizeof(fip_firm));
- // The call to lock and load main, create dep
-
- MOD_DEC_USE_COUNT; //done - kerneld now can unload us
- return rc;
-}
-
-//======================================================================
-int
-ip2_init(void)
-{
- // call to this is in tty_io.c so we need this
- return 0;
-}
-
-//======================================================================
-void
-cleanup_module(void)
-{
+ return ip2_loadmain(io,irq,(unsigned char *)fip_firm,sizeof(fip_firm));
}
+module_init(ip2_init);
MODULE_LICENSE("GPL");
-#else // !MODULE
-
-#ifndef NULL
-# define NULL ((void *) 0)
-#endif
-
+#ifndef MODULE
/******************************************************************************
* ip2_setup:
* str: kernel command line string
@@ -136,15 +106,5 @@ static int __init ip2_setup(char *str)
}
return 1;
}
-
-int
-ip2_init(void) {
- return ip2_loadmain(io,irq,(unsigned char *)fip_firm,sizeof(fip_firm));
-}
-
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,13))
__setup("ip2=", ip2_setup);
-__initcall(ip2_init);
-#endif
-
#endif /* !MODULE */