This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / drivers / block / cpqarray.c
index 486e8e3..cf6bd68 100644 (file)
@@ -21,6 +21,7 @@
  */
 #include <linux/config.h>      /* CONFIG_PROC_FS */
 #include <linux/module.h>
+#include <linux/version.h>
 #include <linux/types.h>
 #include <linux/pci.h>
 #include <linux/bio.h>
@@ -569,9 +570,9 @@ int __init cpqarray_init_step2(void)
 
        /* detect controllers */
        printk(DRIVER_NAME "\n");
-
+/* TODO: If it's an eisa only system, will rc return negative? */
        rc = pci_register_driver(&cpqarray_pci_driver);
-       if (rc)
+       if (rc < 0)
                return rc;
        cpqarray_eisa_detect();
        
@@ -732,6 +733,7 @@ static void __iomem *remap_pci_mem(ulong base, ulong size)
 }
 
 #ifndef MODULE
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,13)
 /*
  * Config string is a comma separated set of i/o addresses of EISA cards.
  */
@@ -748,6 +750,18 @@ static int cpqarray_setup(char *str)
 
 __setup("smart2=", cpqarray_setup);
 
+#else
+
+/*
+ * Copy the contents of the ints[] array passed to us by init.
+ */
+void cpqarray_setup(char *str, int *ints)
+{
+       int i;
+       for(i=0; i<ints[0] && i<8; i++)
+               eisa[i] = ints[i+1];
+}
+#endif
 #endif
 
 /*