Merge branch 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa...
[sfrench/cifs-2.6.git] / drivers / i2c / busses / i2c-cros-ec-tunnel.c
index fc89c13b16325a99ec09015a7a080fc221d19c83..875c22ae54004d4aba33c4a72c4bc398d47ac0a8 100644 (file)
@@ -16,6 +16,8 @@
 #include <linux/platform_device.h>
 #include <linux/slab.h>
 
+#define I2C_MAX_RETRIES 3
+
 /**
  * struct ec_i2c_device - Driver data for I2C tunnel
  *
@@ -229,7 +231,7 @@ static int ec_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg i2c_msgs[],
        msg.indata = response;
        msg.insize = response_len;
 
-       result = bus->ec->cmd_xfer(bus->ec, &msg);
+       result = cros_ec_cmd_xfer(bus->ec, &msg);
        if (result < 0)
                goto exit;
 
@@ -292,6 +294,7 @@ static int ec_i2c_probe(struct platform_device *pdev)
        bus->adap.algo_data = bus;
        bus->adap.dev.parent = &pdev->dev;
        bus->adap.dev.of_node = np;
+       bus->adap.retries = I2C_MAX_RETRIES;
 
        err = i2c_add_adapter(&bus->adap);
        if (err) {