On 01/22/2018 08:42 AM, Bartosz Golaszewski wrote:
From: Bartosz Golaszewski <bgolaszew...@baylibre.com>
i2c_davinci_cpufreq_transition() is implemented in a way that will
block if it ever gets called while no transfer is in progress.
Not only that, but reinit_completion() is never called for xfr_complete.
Use the fact that cpufreq uses an srcu_notifier (running in process
context) for transitions and that the bus_lock is taken during the call
to master_xfer() and simplify the code by removing the transfer
completion entirely and protecting i2c_davinci_cpufreq_transition()
with i2c_lock/unlock_adapter().
Reported-by: David Lechner <da...@lechnology.com>
Signed-off-by: Bartosz Golaszewski <bgolaszew...@baylibre.com>
---
Tested that it fixes the lockup when there is no active transfer.
Tested-by: David Lechner <da...@lechnology.com>