*/
#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>
/* 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();
}
#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.
*/
__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
/*