From 72a956c556b68aa2a9c2c64f5a7b9e50f7bf67e1 Mon Sep 17 00:00:00 2001 From: Alexander Sverdlin Date: Tue, 9 Jun 2015 12:58:29 +0200 Subject: [PATCH] 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-format-patch failed