Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/i2c-2.6
[pandora-kernel.git] / drivers / i2c / busses / i2c-powermac.c
index df786eb..a508cb9 100644 (file)
@@ -20,7 +20,6 @@
 
 */
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/types.h>
@@ -149,8 +148,6 @@ static int i2c_powermac_master_xfer(        struct i2c_adapter *adap,
        int                     read;
        int                     addrdir;
 
-       if (num != 1)
-               return -EINVAL;
        if (msgs->flags & I2C_M_TEN)
                return -EINVAL;
        read = (msgs->flags & I2C_M_RD) != 0;
@@ -167,7 +164,7 @@ static int i2c_powermac_master_xfer(        struct i2c_adapter *adap,
        rc = pmac_i2c_xfer(bus, addrdir, 0, 0, msgs->buf, msgs->len);
  bail:
        pmac_i2c_close(bus);
-       return rc < 0 ? rc : msgs->len;
+       return rc < 0 ? rc : 1;
 }
 
 static u32 i2c_powermac_func(struct i2c_adapter * adapter)
@@ -178,7 +175,7 @@ static u32 i2c_powermac_func(struct i2c_adapter * adapter)
 }
 
 /* For now, we only handle smbus */
-static struct i2c_algorithm i2c_powermac_algorithm = {
+static const struct i2c_algorithm i2c_powermac_algorithm = {
        .smbus_xfer     = i2c_powermac_smbus_xfer,
        .master_xfer    = i2c_powermac_master_xfer,
        .functionality  = i2c_powermac_func,
@@ -210,7 +207,8 @@ static int i2c_powermac_probe(struct device *dev)
        struct pmac_i2c_bus *bus = dev->platform_data;
        struct device_node *parent = NULL;
        struct i2c_adapter *adapter;
-       char name[32], *basename;
+       char name[32];
+       const char *basename;
        int rc;
 
        if (bus == NULL)