]> git.baikalelectronics.ru Git - kernel.git/commit
i2c: designware: Keep pm_runtime_enable/_disable calls in sync
authorJarkko Nikula <jarkko.nikula@linux.intel.com>
Thu, 10 Dec 2015 11:48:43 +0000 (13:48 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Sat, 12 Dec 2015 17:04:57 +0000 (18:04 +0100)
commit602629329074f3dfd4cb1cedaa716b49bda5f587
treee31e0726b461d4b8a5910b58003289974e3eb32d
parentbe95b98df7f0a8ff18568afd8bb9c61972473bd6
i2c: designware: Keep pm_runtime_enable/_disable calls in sync

On an hardware shared I2C bus (certain Intel Baytrail SoC platforms) the
runtime PM disable depth keeps increasing over repeated modprobe/rmmod
cycle because pm_runtime_disable() is called without checking should it
be disabled already because of bus sharing.

This hasn't made any other harm than dev->power.disable_depth keeps
increasing but keep it sync by calling pm_runtime_disable() only when
runtime PM is not disabled.

Reported-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-designware-platdrv.c