Commit 23aac545 authored by Randy Dunlap's avatar Randy Dunlap Committed by James Bottomley

[PATCH] fd_mcs: fix __setup function

Use correct __setup function type and parameters.
Return result from __setup function.
Don't confuse <ints> and <interrupts>.
Signed-off-by: default avatarRandy Dunlap <rddunlap@osdl.org>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 04af7c99
...@@ -78,6 +78,7 @@ ...@@ -78,6 +78,7 @@
**************************************************************************/ **************************************************************************/
#include <linux/module.h> #include <linux/module.h>
#include <linux/init.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/blkdev.h> #include <linux/blkdev.h>
#include <linux/errno.h> #include <linux/errno.h>
...@@ -288,7 +289,7 @@ static irqreturn_t fd_mcs_intr(int irq, void *dev_id, struct pt_regs *regs); ...@@ -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 long addresses[] = { 0xc8000, 0xca000, 0xce000, 0xde000 };
static unsigned short ports[] = { 0x140, 0x150, 0x160, 0x170 }; 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 */ /* host information */
static int found = 0; static int found = 0;
...@@ -297,16 +298,19 @@ static struct Scsi_Host *hosts[FD_MAX_HOSTS + 1] = { NULL }; ...@@ -297,16 +298,19 @@ static struct Scsi_Host *hosts[FD_MAX_HOSTS + 1] = { NULL };
static int user_fifo_count = 0; static int user_fifo_count = 0;
static int user_fifo_size = 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; static int done_setup = 0;
int ints[3];
if (done_setup++ || ints[0] < 1 || ints[0] > 2 || ints[1] < 1 || ints[1] > 16) { 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"); printk("fd_mcs: usage: fd_mcs=FIFO_COUNT, FIFO_SIZE\n");
return 0;
} }
user_fifo_count = ints[0] >= 1 ? ints[1] : 0; user_fifo_count = ints[0] >= 1 ? ints[1] : 0;
user_fifo_size = ints[0] >= 2 ? ints[2] : 0; user_fifo_size = ints[0] >= 2 ? ints[2] : 0;
return 1;
} }
__setup("fd_mcs=", fd_mcs_setup); __setup("fd_mcs=", fd_mcs_setup);
...@@ -391,7 +395,7 @@ static int fd_mcs_detect(Scsi_Host_Template * tpnt) ...@@ -391,7 +395,7 @@ static int fd_mcs_detect(Scsi_Host_Template * tpnt)
} else { } else {
bios = addresses[pos2 >> 6]; bios = addresses[pos2 >> 6];
port = ports[(pos2 >> 4) & 0x03]; port = ports[(pos2 >> 4) & 0x03];
irq = ints[(pos2 >> 1) & 0x07]; irq = interrupts[(pos2 >> 1) & 0x07];
} }
if (irq) { if (irq) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment