diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2016-11-14 09:34:17 -0500 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2016-11-14 12:23:30 -0500 |
commit | 93d710a65ef02fb7fd48ae207e78f460bd7a6089 (patch) | |
tree | ad8822ecd5dc2fe64af69fa68d3230ca6c1fcda9 | |
parent | f10a59eb8c1087f0ce03cf0392cd483922187066 (diff) |
i2c: mux: fix up dependencies
We get the following build error from UM Linux after adding
an entry to drivers/iio/gyro/Kconfig that issues "select I2C_MUX":
ERROR: "devm_ioremap_resource"
[drivers/i2c/muxes/i2c-mux-reg.ko] undefined!
ERROR: "of_address_to_resource"
[drivers/i2c/muxes/i2c-mux-reg.ko] undefined!
It appears that the I2C mux core code depends on HAS_IOMEM
for historical reasons, while CONFIG_I2C_MUX_REG does *not*
have a direct dependency on HAS_IOMEM.
This creates a situation where a allyesconfig or allmodconfig
for UM Linux will select I2C_MUX, and will implicitly enable
I2C_MUX_REG as well, and the compilation will fail for the
register driver.
Fix this up by making I2C_MUX_REG depend on HAS_IOMEM and
removing the dependency from I2C_MUX.
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Reported-by: Jonathan Cameron <jic23@jic23.retrosnub.co.uk>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Cc: stable@kernel.org
-rw-r--r-- | drivers/i2c/Kconfig | 1 | ||||
-rw-r--r-- | drivers/i2c/muxes/Kconfig | 1 |
2 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig index d223650a97e4..11edabf425ae 100644 --- a/drivers/i2c/Kconfig +++ b/drivers/i2c/Kconfig | |||
@@ -59,7 +59,6 @@ config I2C_CHARDEV | |||
59 | 59 | ||
60 | config I2C_MUX | 60 | config I2C_MUX |
61 | tristate "I2C bus multiplexing support" | 61 | tristate "I2C bus multiplexing support" |
62 | depends on HAS_IOMEM | ||
63 | help | 62 | help |
64 | Say Y here if you want the I2C core to support the ability to | 63 | Say Y here if you want the I2C core to support the ability to |
65 | handle multiplexed I2C bus topologies, by presenting each | 64 | handle multiplexed I2C bus topologies, by presenting each |
diff --git a/drivers/i2c/muxes/Kconfig b/drivers/i2c/muxes/Kconfig index e280c8ecc0b5..96de9ce5669b 100644 --- a/drivers/i2c/muxes/Kconfig +++ b/drivers/i2c/muxes/Kconfig | |||
@@ -63,6 +63,7 @@ config I2C_MUX_PINCTRL | |||
63 | 63 | ||
64 | config I2C_MUX_REG | 64 | config I2C_MUX_REG |
65 | tristate "Register-based I2C multiplexer" | 65 | tristate "Register-based I2C multiplexer" |
66 | depends on HAS_IOMEM | ||
66 | help | 67 | help |
67 | If you say yes to this option, support will be included for a | 68 | If you say yes to this option, support will be included for a |
68 | register based I2C multiplexer. This driver provides access to | 69 | register based I2C multiplexer. This driver provides access to |