]> git.baikalelectronics.ru Git - kernel.git/commit
i2c: tegra: Simplify I2C resume
authorJon Hunter <jonathanh@nvidia.com>
Fri, 26 Aug 2016 13:09:03 +0000 (14:09 +0100)
committerWolfram Sang <wsa@the-dreams.de>
Tue, 30 Aug 2016 20:00:08 +0000 (22:00 +0200)
commit10f68cdf885b307471e4746206cb408c1022e832
treef269f6b8f70e072c607058c474941519b3b53e19
parentf932d38b39e5df934a5d2d520f8c552dd9df11a6
i2c: tegra: Simplify I2C resume

The I2C adapter is unlocked regardless of whether the tegra_i2c_init()
called during the resume is successful or not. However, if the
tegra_i2c_init() is not successful, then ->is_suspended is not set to
false. Simplify the resume code by only setting ->is_suspended to false
if tegra_i2c_init() is successful and return the error code from
tegra_i2c_init().

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-tegra.c