Richard
--- linux-2.3.22clean/drivers/scsi/sim710.c Mon Oct 18 22:52:21 1999
+++ linux-2.3.22/drivers/scsi/sim710.c Tue Oct 19 23:16:29 1999
@@ -58,10 +58,9 @@
*
*/
-#define LinuxVersionCode(v, p, s) (((v)<<16)+((p)<<8)+(s))
-
#include <linux/module.h>
+#include <linux/version.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/string.h>
@@ -73,9 +72,9 @@
#include <linux/mca.h>
#include <asm/dma.h>
#include <asm/system.h>
-#if LINUX_VERSION_CODE >= LinuxVersionCode(2,3,17)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,17)
#include <linux/spinlock.h>
-#elif LINUX_VERSION_CODE >= LinuxVersionCode(2,1,93)
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,93)
#include <asm/spinlock.h>
#endif
#include <asm/io.h>
@@ -296,8 +295,9 @@
static void process_issue_queue (struct sim710_hostdata *, unsigned long flags);
static int full_reset(struct Scsi_Host * host);
+
/*
- * Function: void sim710_setup(char *str, int *ints)
+ * Function: int param_setup(char *str)
*/
#ifdef MODULE
@@ -306,8 +306,8 @@
#define ARG_SEP ','
#endif
-void
-sim710_setup(char *str, int *ints)
+static int
+param_setup(char *str)
{
char *cur = str;
char *pc, *pv;
@@ -345,7 +345,7 @@
opt_noneg = val;
else if (!strncmp(cur, "disabled:", 5)) {
no_of_boards = -1;
- return;
+ return 1;
}
#ifdef DEBUG
else if (!strncmp(cur, "debug:", 6)) {
@@ -353,19 +353,28 @@
}
#endif
else
- printk("sim710_setup: unexpected boot option '%.*s' ignored\n", (int)(pc-cur+1), cur);
+ printk("sim710: unexpected boot option '%.*s' ignored\n", (int)(pc-cur+1), cur);
if ((cur = strchr(cur, ARG_SEP)) != NULL)
++cur;
}
+ return 1;
}
-#if LINUX_VERSION_CODE >= LinuxVersionCode(2,3,13)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,13)
#ifndef MODULE
-__setup("sim710=", sim710_setup);
+__setup("sim710=", param_setup);
#endif
+#else
+/* Old boot param syntax support */
+void
+sim710_setup(char *str, int *ints)
+{
+ param_setup(str);
+}
#endif
+
/*
* Function: static const char *sbcl_to_phase (int sbcl)
*/
@@ -1329,7 +1338,7 @@
#ifdef MODULE
if (sim710)
- sim710_setup(sim710, (int *)0);
+ param_setup(sim710);
#endif
if (no_of_boards < 0) {
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/