From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfram Sang Date: Sat, 20 Jun 2015 18:48:24 +0000 Subject: [PATCH 2/2] i2c: sh_mobile: use adapter default for timeout Message-Id: <1434826104-16346-3-git-send-email-wsa@the-dreams.de> List-Id: References: <1434826104-16346-1-git-send-email-wsa@the-dreams.de> In-Reply-To: <1434826104-16346-1-git-send-email-wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: linux-sh-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Magnus Damm , Simon Horman , Laurent Pinchart , Geert Uytterhoeven , Wolfram Sang From: Wolfram Sang 5 seconds is a very large timeout, and it is hardcoded. Use the default timeout from 'struct adapter' which is 1 second. It can also be modified from userspace for specific workloads. Signed-off-by: Wolfram Sang --- drivers/i2c/busses/i2c-sh_mobile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-sh_mobile.c b/drivers/i2c/busses/i2c-sh_mobile.c index 7193bcfdd94013..67eb8d8256ca5d 100644 --- a/drivers/i2c/busses/i2c-sh_mobile.c +++ b/drivers/i2c/busses/i2c-sh_mobile.c @@ -751,7 +751,7 @@ static int sh_mobile_i2c_xfer(struct i2c_adapter *adapter, /* The interrupt handler takes care of the rest... */ k = wait_event_timeout(pd->wait, pd->sr & (ICSR_TACK | SW_DONE), - 5 * HZ); + adap->timeout); if (!k) { dev_err(pd->dev, "Transfer request timed out\n"); if (pd->dma_direction != DMA_NONE) -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in