From: Alexander Sverdlin Date: Tue, 9 Jun 2015 10:58:29 +0000 (+0200) Subject: i2c: davinci: Refactor i2c_davinci_wait_bus_not_busy() X-Git-Tag: omap-for-v4.2/fixes-rc1^2~108^2~19 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=72a956c556b68aa2a9c2c64f5a7b9e50f7bf67e1;p=pandora-kernel.git i2c: davinci: Refactor i2c_davinci_wait_bus_not_busy() There are several problems in the function: - "to_cnt" variable does nothing - schedule_timeout() call without setting current state does nothing - "allow_sleep" parameter is not really used Refactor the function so that it really tries to wait. In case of timeout try to recover the bus. Signed-off-by: Alexander Sverdlin Signed-off-by: Wolfram Sang --- Reading git-diff-tree failed