From: Nicholas Mc Guire Date: Tue, 17 Mar 2015 07:51:13 +0000 (-0400) Subject: i2c: davinci: fixup wait_for_completion_timeout handling X-Git-Tag: omap-for-v4.1/fixes-rc1~146^2~8 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d9e1f4417a43cd0871253b2158eae07a48d656b5;p=pandora-kernel.git i2c: davinci: fixup wait_for_completion_timeout handling wait_for_completion_timeout return 0 (timeout) or >=1 (completion) so the check for >= 0 is always true and can be dropped implying that r==-EREMOTEIO and thus the return of -EREMOTEIO can be done in the if (dev->buf_len) branch. As wait_for_completion_timeout returns unsigned long not int, and int r is exclusively used for wait_for_completion_timeout it is renamed and the type changed to unsigned long. Signed-off-by: Nicholas Mc Guire Acked-by: Alexander Sverdlin Signed-off-by: Wolfram Sang --- Reading git-diff-tree failed