Commit 365322fb authored by Wolfram Sang's avatar Wolfram Sang Committed by Wolfram Sang

i2c: sh_mobile: use proper type for timeout

wait_event_timeout returns long, not int.
Signed-off-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
parent 41bdbd28
...@@ -730,7 +730,8 @@ static int sh_mobile_i2c_xfer(struct i2c_adapter *adapter, ...@@ -730,7 +730,8 @@ static int sh_mobile_i2c_xfer(struct i2c_adapter *adapter,
struct sh_mobile_i2c_data *pd = i2c_get_adapdata(adapter); struct sh_mobile_i2c_data *pd = i2c_get_adapdata(adapter);
struct i2c_msg *msg; struct i2c_msg *msg;
int err = 0; int err = 0;
int i, k; int i;
long timeout;
activate_ch(pd); activate_ch(pd);
...@@ -749,10 +750,10 @@ static int sh_mobile_i2c_xfer(struct i2c_adapter *adapter, ...@@ -749,10 +750,10 @@ static int sh_mobile_i2c_xfer(struct i2c_adapter *adapter,
i2c_op(pd, OP_START, 0); i2c_op(pd, OP_START, 0);
/* The interrupt handler takes care of the rest... */ /* The interrupt handler takes care of the rest... */
k = wait_event_timeout(pd->wait, timeout = wait_event_timeout(pd->wait,
pd->sr & (ICSR_TACK | SW_DONE), pd->sr & (ICSR_TACK | SW_DONE),
adapter->timeout); adapter->timeout);
if (!k) { if (!timeout) {
dev_err(pd->dev, "Transfer request timed out\n"); dev_err(pd->dev, "Transfer request timed out\n");
if (pd->dma_direction != DMA_NONE) if (pd->dma_direction != DMA_NONE)
sh_mobile_i2c_cleanup_dma(pd); sh_mobile_i2c_cleanup_dma(pd);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment