patch-2_6_7-vs1_9_1_12
[linux-2.6.git] / drivers / i2c / busses / i2c-amd756.c
index 261b5d9..4b11513 100644 (file)
@@ -41,6 +41,7 @@
 #include <linux/module.h>
 #include <linux/pci.h>
 #include <linux/kernel.h>
+#include <linux/delay.h>
 #include <linux/stddef.h>
 #include <linux/sched.h>
 #include <linux/ioport.h>
@@ -124,7 +125,7 @@ static int amd756_transaction(struct i2c_adapter *adap)
        if ((temp = inw_p(SMB_GLOBAL_STATUS)) & (GS_HST_STS | GS_SMB_STS)) {
                dev_dbg(&adap->dev, ": SMBus busy (%04x). Waiting... \n", temp);
                do {
-                       i2c_delay(1);
+                       msleep(1);
                        temp = inw_p(SMB_GLOBAL_STATUS);
                } while ((temp & (GS_HST_STS | GS_SMB_STS)) &&
                         (timeout++ < MAX_TIMEOUT));
@@ -141,7 +142,7 @@ static int amd756_transaction(struct i2c_adapter *adap)
 
        /* We will always wait for a fraction of a second! */
        do {
-               i2c_delay(1);
+               msleep(1);
                temp = inw_p(SMB_GLOBAL_STATUS);
        } while ((temp & GS_HST_STS) && (timeout++ < MAX_TIMEOUT));
 
@@ -188,7 +189,7 @@ static int amd756_transaction(struct i2c_adapter *adap)
  abort:
        dev_warn(&adap->dev, ": Sending abort.\n");
        outw_p(inw(SMB_GLOBAL_ENABLE) | GE_ABORT, SMB_GLOBAL_ENABLE);
-       i2c_delay(100);
+       msleep(100);
        outw_p(GS_CLEAR_STS, SMB_GLOBAL_STATUS);
        return -1;
 }
@@ -303,7 +304,7 @@ static struct i2c_algorithm smbus_algorithm = {
 
 static struct i2c_adapter amd756_adapter = {
        .owner          = THIS_MODULE,
-       .class          = I2C_ADAP_CLASS_SMBUS,
+       .class          = I2C_CLASS_HWMON,
        .algo           = &smbus_algorithm,
        .name           = "unset",
 };