Searched hist:"19 cfcafd7f0fa7a672f0ac5146e2ff38594497b0" (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/drivers/i2c/busses/ |
H A D | i2c-davinci.c | diff 19cfcafd7f0fa7a672f0ac5146e2ff38594497b0 Mon Jan 22 08:42:58 CST 2018 Bartosz Golaszewski <bgolaszewski@baylibre.com> i2c: davinci: fix the cpufreq transition
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 <david@lechnology.com> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Reviewed-by: Sekhar Nori <nsekhar@ti.com> Tested-by: David Lechner <david@lechnology.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
|