]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/i2c/busses/i2c-ixp4xx.c
[PATCH] Fix i2c-ixp4xx compile (missing brace)
[linux-2.6-omap-h63xx.git] / drivers / i2c / busses / i2c-ixp4xx.c
index f87220be3c87ddc09795e1d77d6dc1eda0e56986..68fe863f9d54b15fbcbd4bf4b75e2bcda94b7757 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * drivers/i2c/i2c-adap-ixp4xx.c
+ * drivers/i2c/busses/i2c-ixp4xx.c
  *
  * Intel's IXP4xx XScale NPU chipsets (IXP420, 421, 422, 425) do not have
  * an on board I2C controller but provide 16 GPIO pins that are often
@@ -35,8 +35,6 @@
 
 #include <asm/hardware.h>      /* Pick up IXP4xx-specific bits */
 
-static struct platform_driver ixp4xx_i2c_driver;
-
 static inline int ixp4xx_scl_pin(void *data)
 {
        return ((struct ixp4xx_i2c_pins*)data)->scl_pin;
@@ -124,11 +122,11 @@ static int ixp4xx_i2c_probe(struct platform_device *plat_dev)
        drv_data->algo_data.getsda = ixp4xx_bit_getsda;
        drv_data->algo_data.getscl = ixp4xx_bit_getscl;
        drv_data->algo_data.udelay = 10;
-       drv_data->algo_data.mdelay = 10;
        drv_data->algo_data.timeout = 100;
 
        drv_data->adapter.id = I2C_HW_B_IXP4XX;
-       strlcpy(drv_data->adapter.name, ixp4xx_i2c_driver.driver.name,
+       drv_data->adapter.class = I2C_CLASS_HWMON;
+       strlcpy(drv_data->adapter.name, plat_dev->dev.driver->name,
                I2C_NAME_SIZE);
        drv_data->adapter.algo_data = &drv_data->algo_data;
 
@@ -139,9 +137,9 @@ static int ixp4xx_i2c_probe(struct platform_device *plat_dev)
        gpio_line_set(gpio->scl_pin, 0);
        gpio_line_set(gpio->sda_pin, 0);
 
-       if ((err = i2c_bit_add_bus(&drv_data->adapter) != 0)) {
-               printk(KERN_ERR "ERROR: Could not install %s\n", 
-                               plat_dev->dev.bus_id);
+       err = i2c_bit_add_bus(&drv_data->adapter);
+       if (err) {
+               printk(KERN_ERR "ERROR: Could not install %s\n", plat_dev->dev.bus_id);
 
                kfree(drv_data);
                return err;