diff options
author | Bartosz Golaszewski <bgolaszewski@baylibre.com> | 2018-01-22 17:42:58 +0300 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2018-01-24 09:14:59 +0300 |
commit | 19cfcafd7f0fa7a672f0ac5146e2ff38594497b0 (patch) | |
tree | b052f7a036c236bdf70674bef6a60671752df124 /drivers/i2c/busses/i2c-imx-lpi2c.c | |
parent | 5bacb56b2b56283ab26fea9e15f06ebe27afbe3d (diff) | |
download | linux-19cfcafd7f0fa7a672f0ac5146e2ff38594497b0.tar.xz |
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>
Diffstat (limited to 'drivers/i2c/busses/i2c-imx-lpi2c.c')
0 files changed, 0 insertions, 0 deletions