Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / drivers / isdn / sc / init.c
index efefede..62b7acf 100644 (file)
@@ -20,9 +20,9 @@ board *sc_adapter[MAX_CARDS];
 int cinst;
 
 static char devname[] = "scX";
-const char version[] = "2.0b1";
+static const char version[] = "2.0b1";
 
-const char *boardname[] = { "DataCommute/BRI", "DataCommute/PRI", "TeleCommute/BRI" };
+static const char *boardname[] = { "DataCommute/BRI", "DataCommute/PRI", "TeleCommute/BRI" };
 
 /* insmod set parameters */
 static unsigned int io[] = {0,0,0,0};
@@ -35,26 +35,13 @@ 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
-
 extern irqreturn_t interrupt_handler(int, void *, struct pt_regs *);
 extern int sndpkt(int, int, int, struct sk_buff *);
 extern int command(isdn_ctrl *);
 extern int indicate_status(int, int, ulong, char*);
 extern int reset(int);
 
-int identify_board(unsigned long, unsigned int);
-
-int irq_supported(int irq_x)
-{
-       int i;
-       for(i=0 ; i < MAX_IRQS ; i++) {
-               if(sup_irq[i] == irq_x)
-                       return 1;
-       }
-       return 0;
-}
+static int identify_board(unsigned long, unsigned int);
 
 static int __init sc_init(void)
 {
@@ -100,7 +87,7 @@ static int __init sc_init(void)
                         */
                        for (i = 0 ; i < MAX_IO_REGS - 1 ; i++) {
                                if(!request_region(io[b] + i * 0x400, 1, "sc test")) {
-                                       pr_debug("check_region for 0x%x failed\n", io[b] + i * 0x400);
+                                       pr_debug("request_region for 0x%x failed\n", io[b] + i * 0x400);
                                        io[b] = 0;
                                        break;
                                } else
@@ -194,7 +181,7 @@ static int __init sc_init(void)
                        for (i = SRAM_MIN ; i < SRAM_MAX ; i += SRAM_PAGESIZE) {
                                pr_debug("Checking RAM address 0x%x...\n", i);
                                if(request_region(i, SRAM_PAGESIZE, "sc test")) {
-                                       pr_debug("  check_region succeeded\n");
+                                       pr_debug("  request_region succeeded\n");
                                        model = identify_board(i, io[b]);
                                        release_region(i, SRAM_PAGESIZE);
                                        if (model >= 0) {
@@ -454,7 +441,7 @@ static void __exit sc_exit(void)
        pr_info("SpellCaster ISA ISDN Adapter Driver Unloaded.\n");
 }
 
-int identify_board(unsigned long rambase, unsigned int iobase) 
+static int identify_board(unsigned long rambase, unsigned int iobase)
 {
        unsigned int pgport;
        unsigned long sig;
@@ -542,8 +529,7 @@ int identify_board(unsigned long rambase, unsigned int iobase)
         */
        x = 0;
        while((inb(iobase + FIFOSTAT_OFFSET) & RF_HAS_DATA) && x < 100) {
-               set_current_state(TASK_INTERRUPTIBLE);
-               schedule_timeout(1);
+               schedule_timeout_interruptible(1);
                x++;
        }
        if(x == 100) {