upgrade to linux 2.6.9-1.11_FC2
[linux-2.6.git] / drivers / i2c / busses / scx200_acb.c
index 2a33ae4..62b7614 100644 (file)
@@ -24,7 +24,6 @@
 
 */
 
-#include <linux/config.h>
 #include <linux/config.h>
 #include <linux/module.h>
 #include <linux/errno.h>
@@ -33,6 +32,7 @@
 #include <linux/i2c.h>
 #include <linux/smp_lock.h>
 #include <linux/pci.h>
+#include <linux/delay.h>
 #include <asm/io.h>
 
 #include <linux/scx200.h>
@@ -44,8 +44,9 @@ MODULE_DESCRIPTION("NatSemi SCx200 ACCESS.bus Driver");
 MODULE_LICENSE("GPL");
 
 #define MAX_DEVICES 4
-static int base[MAX_DEVICES] = { 0x840 };
-MODULE_PARM(base, "1-4i");
+static int base[MAX_DEVICES] = { 0x820, 0x840 };
+static int num_base;
+module_param_array(base, int, num_base, 0);
 MODULE_PARM_DESC(base, "Base addresses for the ACCESS.bus controllers");
 
 #ifdef DEBUG
@@ -255,7 +256,7 @@ static void scx200_acb_poll(struct scx200_acb_iface *iface)
                        scx200_acb_machine(iface, status);
                        return;
                }
-               schedule_timeout(HZ/100+1);
+               msleep(10);
        }
 
        scx200_acb_timeout(iface);
@@ -459,6 +460,7 @@ static int  __init scx200_acb_create(int base, int index)
        adapter->owner = THIS_MODULE;
        adapter->id = I2C_ALGO_SMBUS;
        adapter->algo = &scx200_acb_algorithm;
+       adapter->class = I2C_CLASS_HWMON;
 
        init_MUTEX(&iface->sem);
 
@@ -511,7 +513,10 @@ static int __init scx200_acb_init(void)
        /* Verify that this really is a SCx200 processor */
        if (pci_find_device(PCI_VENDOR_ID_NS,
                            PCI_DEVICE_ID_NS_SCx200_BRIDGE,
-                           NULL) == NULL)
+                           NULL) == NULL
+           && pci_find_device(PCI_VENDOR_ID_NS,
+                              PCI_DEVICE_ID_NS_SC1100_BRIDGE,
+                              NULL) == NULL)
                return -ENODEV;
 
        rc = -ENXIO;