i2c: mxs: match wait_for_completion_timeout return type
Return type of wait_for_completion_timeout is unsigned long not int. An appropriately named unsigned long is added and the assignment fixed up. Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
This commit is contained in:
parent
9ed1d862d7
commit
271a89cdd6
1 changed files with 3 additions and 2 deletions
|
@ -568,6 +568,7 @@ static int mxs_i2c_xfer_msg(struct i2c_adapter *adap, struct i2c_msg *msg,
|
||||||
int ret;
|
int ret;
|
||||||
int flags;
|
int flags;
|
||||||
int use_pio = 0;
|
int use_pio = 0;
|
||||||
|
unsigned long time_left;
|
||||||
|
|
||||||
flags = stop ? MXS_I2C_CTRL0_POST_SEND_STOP : 0;
|
flags = stop ? MXS_I2C_CTRL0_POST_SEND_STOP : 0;
|
||||||
|
|
||||||
|
@ -599,9 +600,9 @@ static int mxs_i2c_xfer_msg(struct i2c_adapter *adap, struct i2c_msg *msg,
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
ret = wait_for_completion_timeout(&i2c->cmd_complete,
|
time_left = wait_for_completion_timeout(&i2c->cmd_complete,
|
||||||
msecs_to_jiffies(1000));
|
msecs_to_jiffies(1000));
|
||||||
if (ret == 0)
|
if (!time_left)
|
||||||
goto timeout;
|
goto timeout;
|
||||||
|
|
||||||
ret = i2c->cmd_err;
|
ret = i2c->cmd_err;
|
||||||
|
|
Loading…
Add table
Reference in a new issue