Commit 01a654d6 authored by Randy Dunlap's avatar Randy Dunlap Committed by James Bottomley

[PATCH] NCR53c406a: fix __setup function

Use correct __setup function type and parameters.
Return result from __setup function.
Signed-off-by: default avatarRandy Dunlap <rddunlap@osdl.org>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 23aac545
...@@ -606,22 +606,23 @@ static int NCR53c406a_release(struct Scsi_Host *shost) ...@@ -606,22 +606,23 @@ static int NCR53c406a_release(struct Scsi_Host *shost)
} }
/* called from init/main.c */ /* called from init/main.c */
static void __init NCR53c406a_setup(char *str, int *ints) static int __init NCR53c406a_setup(char *str)
{ {
static size_t setup_idx = 0; static size_t setup_idx = 0;
size_t i; size_t i;
int ints[4];
DEB(printk("NCR53c406a: Setup called\n"); DEB(printk("NCR53c406a: Setup called\n");
); );
if (setup_idx >= PORT_COUNT - 1) { if (setup_idx >= PORT_COUNT - 1) {
printk("NCR53c406a: Setup called too many times. Bad LILO params?\n"); printk("NCR53c406a: Setup called too many times. Bad LILO params?\n");
return; return 0;
} }
if (ints[0] < 1 || ints[0] > 3) { if (ints[0] < 1 || ints[0] > 3) {
printk("NCR53c406a: Malformed command line\n"); printk("NCR53c406a: Malformed command line\n");
printk("NCR53c406a: Usage: ncr53c406a=<PORTBASE>[,<IRQ>[,<FASTPIO>]]\n"); printk("NCR53c406a: Usage: ncr53c406a=<PORTBASE>[,<IRQ>[,<FASTPIO>]]\n");
return; return 0;
} }
for (i = 0; i < PORT_COUNT && !port_base; i++) for (i = 0; i < PORT_COUNT && !port_base; i++)
if (ports[i] == ints[1]) { if (ports[i] == ints[1]) {
...@@ -631,7 +632,7 @@ static void __init NCR53c406a_setup(char *str, int *ints) ...@@ -631,7 +632,7 @@ static void __init NCR53c406a_setup(char *str, int *ints)
} }
if (!port_base) { if (!port_base) {
printk("NCR53c406a: Invalid PORTBASE 0x%x specified\n", ints[1]); printk("NCR53c406a: Invalid PORTBASE 0x%x specified\n", ints[1]);
return; return 0;
} }
if (ints[0] > 1) { if (ints[0] > 1) {
...@@ -654,6 +655,7 @@ static void __init NCR53c406a_setup(char *str, int *ints) ...@@ -654,6 +655,7 @@ static void __init NCR53c406a_setup(char *str, int *ints)
fast_pio = ints[3]; fast_pio = ints[3];
DEB(printk("NCR53c406a: port_base=0x%x, irq=%d, fast_pio=%d\n", port_base, irq_level, fast_pio);) DEB(printk("NCR53c406a: port_base=0x%x, irq=%d, fast_pio=%d\n", port_base, irq_level, fast_pio);)
return 1;
} }
__setup("ncr53c406a=", NCR53c406a_setup); __setup("ncr53c406a=", NCR53c406a_setup);
......
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