[PATCH] i2c: davinci: fix the cpufreq transition

Wolfram Sang wsa at the-dreams.de
Tue Jan 23 22:15:50 PST 2018


On Mon, Jan 22, 2018 at 03:42:58PM +0100, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bgolaszewski at 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 <david at lechnology.com>
> Signed-off-by: Bartosz Golaszewski <bgolaszewski at baylibre.com>

Applied to for-next, thanks!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180124/c6444fb9/attachment.sig>


More information about the linux-arm-kernel mailing list