vserver 1.9.5.x5
[linux-2.6.git] / drivers / isdn / sc / init.c
index 930845c..efefede 100644 (file)
@@ -7,6 +7,7 @@
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/interrupt.h>
+#include <linux/delay.h>
 #include "includes.h"
 #include "hardware.h"
 #include "card.h"
 MODULE_DESCRIPTION("ISDN4Linux: Driver for Spellcaster card");
 MODULE_AUTHOR("Spellcaster Telecommunications Inc.");
 MODULE_LICENSE("GPL");
-MODULE_PARM( io, "1-" __MODULE_STRING(MAX_CARDS) "i");
-MODULE_PARM(irq, "1-" __MODULE_STRING(MAX_CARDS) "i");
-MODULE_PARM(ram, "1-" __MODULE_STRING(MAX_CARDS) "i");
-MODULE_PARM(do_reset, "i");
 
 board *sc_adapter[MAX_CARDS];
 int cinst;
@@ -33,6 +30,11 @@ static unsigned char irq[] = {0,0,0,0};
 static unsigned long ram[] = {0,0,0,0};
 static int do_reset = 0;
 
+module_param_array(io, int, NULL, 0);
+module_param_array(irq, int, NULL, 0);
+module_param_array(ram, int, NULL, 0);
+module_param(do_reset, bool, 0);
+
 static int sup_irq[] = { 11, 10, 9, 5, 12, 14, 7, 3, 4, 6 };
 #define MAX_IRQS       10
 
@@ -167,8 +169,7 @@ static int __init sc_init(void)
                if(do_reset) {
                        pr_debug("Doing a SAFE probe reset\n");
                        outb(0xFF, io[b] + RESET_OFFSET);
-                       set_current_state(TASK_INTERRUPTIBLE);
-                       schedule_timeout(milliseconds(10000));
+                       msleep_interruptible(10000);
                }
                pr_debug("RAM Base for board %d is 0x%x, %s probe\n", b, ram[b],
                        ram[b] == 0 ? "will" : "won't");
@@ -500,8 +501,7 @@ int identify_board(unsigned long rambase, unsigned int iobase)
         * Try to identify a PRI card
         */
        outb(PRI_BASEPG_VAL, pgport);
-       set_current_state(TASK_INTERRUPTIBLE);
-       schedule_timeout(HZ);
+       msleep_interruptible(1000);
        sig = readl(rambase + SIG_OFFSET);
        pr_debug("Looking for a signature, got 0x%x\n", sig);
        if(sig == SIGNATURE)
@@ -511,8 +511,7 @@ int identify_board(unsigned long rambase, unsigned int iobase)
         * Try to identify a PRI card
         */
        outb(BRI_BASEPG_VAL, pgport);
-       set_current_state(TASK_INTERRUPTIBLE);
-       schedule_timeout(HZ);
+       msleep_interruptible(1000);
        sig = readl(rambase + SIG_OFFSET);
        pr_debug("Looking for a signature, got 0x%x\n", sig);
        if(sig == SIGNATURE)