aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
authorNicholas Mc Guire <hofrat@osadl.org>2015-03-10 14:08:13 -0400
committerWolfram Sang <wsa@the-dreams.de>2015-03-15 05:14:10 -0400
commit271a89cdd65f8c2b4a6be865859f8d2d1b504696 (patch)
tree147551e74dd8481d0fb72e66f90dc6b5f98c07eb /drivers/i2c
parent9ed1d862d7244b104c1519b329ec307b46bcf2a3 (diff)
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>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-mxs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-mxs.c b/drivers/i2c/busses/i2c-mxs.c
index ff8b12c8d25f..56fceff6ba14 100644
--- a/drivers/i2c/busses/i2c-mxs.c
+++ b/drivers/i2c/busses/i2c-mxs.c
@@ -568,6 +568,7 @@ static int mxs_i2c_xfer_msg(struct i2c_adapter *adap, struct i2c_msg *msg,
568 int ret; 568 int ret;
569 int flags; 569 int flags;
570 int use_pio = 0; 570 int use_pio = 0;
571 unsigned long time_left;
571 572
572 flags = stop ? MXS_I2C_CTRL0_POST_SEND_STOP : 0; 573 flags = stop ? MXS_I2C_CTRL0_POST_SEND_STOP : 0;
573 574
@@ -599,9 +600,9 @@ static int mxs_i2c_xfer_msg(struct i2c_adapter *adap, struct i2c_msg *msg,
599 if (ret) 600 if (ret)
600 return ret; 601 return ret;
601 602
602 ret = wait_for_completion_timeout(&i2c->cmd_complete, 603 time_left = wait_for_completion_timeout(&i2c->cmd_complete,
603 msecs_to_jiffies(1000)); 604 msecs_to_jiffies(1000));
604 if (ret == 0) 605 if (!time_left)
605 goto timeout; 606 goto timeout;
606 607
607 ret = i2c->cmd_err; 608 ret = i2c->cmd_err;