]> git.baikalelectronics.ru Git - kernel.git/commit
i2c: tegra: Compile PM functions unconditionally
authorDmitry Osipenko <digetx@gmail.com>
Sun, 7 Jul 2019 23:12:34 +0000 (02:12 +0300)
committerWolfram Sang <wsa@the-dreams.de>
Thu, 1 Aug 2019 12:45:18 +0000 (14:45 +0200)
commit61e513267e9ebf0d8b79b72f7514e4d74b66d316
treec5cce369c710d52d1ac851be2d74c0ab6c03641f
parentbfe2de5a355e71917b08e947fe3e805ec2f51c71
i2c: tegra: Compile PM functions unconditionally

The I2C driver fails to probe if CONFIG_PM_SLEEP=n because runtime PM
doesn't depend on the PM sleep and in this case the runtime PM ops are
not included in the driver, resulting in I2C clock not being enabled.
It's much cleaner to simply allow compiler to remove the dead code
instead of messing with the #ifdefs.

This patch fixes such errors when CONFIG_PM_SLEEP=n:

  tegra-i2c 7000c400.i2c: timeout waiting for fifo flush
  tegra-i2c 7000c400.i2c: Failed to initialize i2c controller

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Acked-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-tegra.c