android_kernel_oneplus_msm8998/drivers/i2c/muxes
Linus Walleij 936d157fa7 i2c: mux: fix up dependencies
commit 93d710a65ef02fb7fd48ae207e78f460bd7a6089 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-26 09:54:52 +01:00
..
i2c-arb-gpio-challenge.c i2c: muxes: fix leaked i2c adapter device node references 2015-08-31 22:40:34 +02:00
i2c-mux-gpio.c i2c: muxes: fix leaked i2c adapter device node references 2015-08-31 22:40:34 +02:00
i2c-mux-pca954x.c i2c: Drop owner assignment from i2c_driver 2015-08-10 08:37:35 +02:00
i2c-mux-pca9541.c i2c: Drop owner assignment from i2c_driver 2015-08-10 08:37:35 +02:00
i2c-mux-pinctrl.c i2c: muxes: fix leaked i2c adapter device node references 2015-08-31 22:40:34 +02:00
i2c-mux-reg.c i2c: mux: reg: wrong condition checked for of_address_to_resource return value 2016-08-10 11:49:29 +02:00
Kconfig i2c: mux: fix up dependencies 2016-11-26 09:54:52 +01:00
Makefile i2c: mux: Add register-based mux i2c-mux-reg 2015-08-24 14:05:18 +02:00