vserver 1.9.3
[linux-2.6.git] / drivers / scsi / fd_mcs.c
index 763e33b..32e0cd5 100644 (file)
@@ -78,6 +78,7 @@
  **************************************************************************/
 
 #include <linux/module.h>
+#include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/blkdev.h>
 #include <linux/errno.h>
@@ -288,7 +289,7 @@ static irqreturn_t fd_mcs_intr(int irq, void *dev_id, struct pt_regs *regs);
 
 static unsigned long addresses[] = { 0xc8000, 0xca000, 0xce000, 0xde000 };
 static unsigned short ports[] = { 0x140, 0x150, 0x160, 0x170 };
-static unsigned short ints[] = { 3, 5, 10, 11, 12, 14, 15, 0 };
+static unsigned short interrupts[] = { 3, 5, 10, 11, 12, 14, 15, 0 };
 
 /* host information */
 static int found = 0;
@@ -297,16 +298,20 @@ static struct Scsi_Host *hosts[FD_MAX_HOSTS + 1] = { NULL };
 static int user_fifo_count = 0;
 static int user_fifo_size = 0;
 
-static void fd_mcs_setup(char *str, int *ints)
+static int __init fd_mcs_setup(char *str)
 {
        static int done_setup = 0;
+       int ints[3];
 
+       get_options(str, 3, ints);
        if (done_setup++ || ints[0] < 1 || ints[0] > 2 || ints[1] < 1 || ints[1] > 16) {
                printk("fd_mcs: usage: fd_mcs=FIFO_COUNT, FIFO_SIZE\n");
+               return 0;
        }
 
        user_fifo_count = ints[0] >= 1 ? ints[1] : 0;
        user_fifo_size = ints[0] >= 2 ? ints[2] : 0;
+       return 1;
 }
 
 __setup("fd_mcs=", fd_mcs_setup);
@@ -391,7 +396,7 @@ static int fd_mcs_detect(Scsi_Host_Template * tpnt)
                        } else {
                                bios = addresses[pos2 >> 6];
                                port = ports[(pos2 >> 4) & 0x03];
-                               irq = ints[(pos2 >> 1) & 0x07];
+                               irq = interrupts[(pos2 >> 1) & 0x07];
                        }
 
                        if (irq) {