i2c: axxia: fixup return type of wait_for_completion_timeout
authorNicholas Mc Guire <hofrat@osadl.org>
Sun, 8 Feb 2015 15:36:48 +0000 (10:36 -0500)
committerWolfram Sang <wsa@the-dreams.de>
Sun, 15 Mar 2015 09:51:34 +0000 (10:51 +0100)
return type of wait_for_completion_timeout is unsigned long not int. The
return variable is renamed to reflect its use and the type adjusted to
unsigned long.

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-axxia.c

index 488c5d3..32d8834 100644 (file)
@@ -334,7 +334,7 @@ static int axxia_i2c_xfer_msg(struct axxia_i2c_dev *idev, struct i2c_msg *msg)
        u32 int_mask = MST_STATUS_ERR | MST_STATUS_SNS;
        u32 rx_xfer, tx_xfer;
        u32 addr_1, addr_2;
-       int ret;
+       unsigned long time_left;
 
        idev->msg = msg;
        idev->msg_xfrd = 0;
@@ -383,15 +383,15 @@ static int axxia_i2c_xfer_msg(struct axxia_i2c_dev *idev, struct i2c_msg *msg)
 
        i2c_int_enable(idev, int_mask);
 
-       ret = wait_for_completion_timeout(&idev->msg_complete,
-                                         I2C_XFER_TIMEOUT);
+       time_left = wait_for_completion_timeout(&idev->msg_complete,
+                                             I2C_XFER_TIMEOUT);
 
        i2c_int_disable(idev, int_mask);
 
        if (readl(idev->base + MST_COMMAND) & CMD_BUSY)
                dev_warn(idev->dev, "busy after xfer\n");
 
-       if (ret == 0)
+       if (time_left == 0)
                idev->msg_err = -ETIMEDOUT;
 
        if (unlikely(idev->msg_err) && idev->msg_err != -ENXIO)
@@ -403,17 +403,17 @@ static int axxia_i2c_xfer_msg(struct axxia_i2c_dev *idev, struct i2c_msg *msg)
 static int axxia_i2c_stop(struct axxia_i2c_dev *idev)
 {
        u32 int_mask = MST_STATUS_ERR | MST_STATUS_SCC;
-       int ret;
+       unsigned long time_left;
 
        reinit_completion(&idev->msg_complete);
 
        /* Issue stop */
        writel(0xb, idev->base + MST_COMMAND);
        i2c_int_enable(idev, int_mask);
-       ret = wait_for_completion_timeout(&idev->msg_complete,
-                                         I2C_STOP_TIMEOUT);
+       time_left = wait_for_completion_timeout(&idev->msg_complete,
+                                             I2C_STOP_TIMEOUT);
        i2c_int_disable(idev, int_mask);
-       if (ret == 0)
+       if (time_left == 0)
                return -ETIMEDOUT;
 
        if (readl(idev->base + MST_COMMAND) & CMD_BUSY)