summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/i2c/muxes
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/drivers/i2c/muxes')
-rw-r--r--kernel/drivers/i2c/muxes/Kconfig1
-rw-r--r--kernel/drivers/i2c/muxes/i2c-mux-reg.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/kernel/drivers/i2c/muxes/Kconfig b/kernel/drivers/i2c/muxes/Kconfig
index f06b0e246..af2a63cb4 100644
--- a/kernel/drivers/i2c/muxes/Kconfig
+++ b/kernel/drivers/i2c/muxes/Kconfig
@@ -63,6 +63,7 @@ config I2C_MUX_PINCTRL
config I2C_MUX_REG
tristate "Register-based I2C multiplexer"
+ depends on HAS_IOMEM
help
If you say yes to this option, support will be included for a
register based I2C multiplexer. This driver provides access to
diff --git a/kernel/drivers/i2c/muxes/i2c-mux-reg.c b/kernel/drivers/i2c/muxes/i2c-mux-reg.c
index 5fbd5bd08..49fc2c7e5 100644
--- a/kernel/drivers/i2c/muxes/i2c-mux-reg.c
+++ b/kernel/drivers/i2c/muxes/i2c-mux-reg.c
@@ -150,7 +150,7 @@ static int i2c_mux_reg_probe_dt(struct regmux *mux,
mux->data.idle_in_use = true;
/* map address from "reg" if exists */
- if (of_address_to_resource(np, 0, &res)) {
+ if (of_address_to_resource(np, 0, &res) == 0) {
mux->data.reg_size = resource_size(&res);
mux->data.reg = devm_ioremap_resource(&pdev->dev, &res);
if (IS_ERR(mux->data.reg))