]> git.karo-electronics.de Git - karo-tx-linux.git/commit
i2c: rcar: use devm_clk_get to ensure clock is properly ref-counted
authorBen Dooks <ben.dooks@codethink.co.uk>
Sun, 26 Jan 2014 16:05:35 +0000 (16:05 +0000)
committerWolfram Sang <wsa@the-dreams.de>
Sun, 26 Jan 2014 21:48:34 +0000 (22:48 +0100)
commitbc8120f17ae87da0850b4e6a806ad88ffd01ca64
treee41afe3176a871a1b7d347c10217430d19bb6dc8
parent770540f029ba65a2658b5204d850565ab7f61f1b
i2c: rcar: use devm_clk_get to ensure clock is properly ref-counted

The current i2c-rcar driver does clk_get() without a corresponding
clk_put(). Add the clk to the driver private data and then get it
with the devm functions so that it is released when the driver is
unbound.

Note, we do not call clk_prepare_enable() at this point due to the
very possible magic that is being done by the pm_runtime system
underneath the driver.

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-rcar.c