Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / drivers / i2c / busses / i2c-ali1535.c
index b00cd40..d3ef46a 100644 (file)
@@ -53,7 +53,6 @@
 
 /* Note: we assume there can only be one ALI1535, with one SMBus interface */
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/pci.h>
 #include <linux/kernel.h>
@@ -64,7 +63,6 @@
 #include <linux/i2c.h>
 #include <linux/init.h>
 #include <asm/io.h>
-#include <asm/semaphore.h>
 
 
 /* ALI1535 SMBus address offsets */
                                        /*  -> Read  = 1                */
 #define        ALI1535_SMBIO_EN        0x04    /* SMB I/O Space enable         */
 
-
+static struct pci_driver ali1535_driver;
 static unsigned short ali1535_smba;
-static DECLARE_MUTEX(i2c_ali1535_sem);
 
 /* Detect whether a ALI1535 can be found, and initialize it, where necessary.
    Note the differences between kernels with the old PCI BIOS interface and
@@ -163,7 +160,8 @@ static int ali1535_setup(struct pci_dev *dev)
                goto exit;
        }
 
-       if (!request_region(ali1535_smba, ALI1535_SMB_IOSIZE, "ali1535-smb")) {
+       if (!request_region(ali1535_smba, ALI1535_SMB_IOSIZE,
+                           ali1535_driver.name)) {
                dev_err(&dev->dev, "ALI1535_smb region 0x%x already in use!\n",
                        ali1535_smba);
                goto exit;
@@ -345,7 +343,6 @@ static s32 ali1535_access(struct i2c_adapter *adap, u16 addr,
        int timeout;
        s32 result = 0;
 
-       down(&i2c_ali1535_sem);
        /* make sure SMBus is idle */
        temp = inb_p(SMBHSTSTS);
        for (timeout = 0;
@@ -460,7 +457,6 @@ static s32 ali1535_access(struct i2c_adapter *adap, u16 addr,
                break;
        }
 EXIT:
-       up(&i2c_ali1535_sem);
        return result;
 }
 
@@ -473,8 +469,6 @@ static u32 ali1535_func(struct i2c_adapter *adapter)
 }
 
 static struct i2c_algorithm smbus_algorithm = {
-       .name           = "Non-i2c SMBus adapter",
-       .id             = I2C_ALGO_SMBUS,
        .smbus_xfer     = ali1535_access,
        .functionality  = ali1535_func,
 };
@@ -483,7 +477,6 @@ static struct i2c_adapter ali1535_adapter = {
        .owner          = THIS_MODULE,
        .class          = I2C_CLASS_HWMON,
        .algo           = &smbus_algorithm,
-       .name           = "unset",
 };
 
 static struct pci_device_id ali1535_ids[] = {