Skip to contentSkip to conversation

mux: mmio: depends on REGMAP

PATCH New Randy Dunlap 1 participant 1 message Jul 28, 2022 Multiplexer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mux: mmio: depends on REGMAP

Fix build error when CONFIG_REGMAP is not set/enabled:

../drivers/mux/mmio.c: In function ‘mux_mmio_probe’:
../drivers/mux/mmio.c:76:34: error: storage size of ‘field’ isn’t known
76 | struct reg_field field;
../drivers/mux/mmio.c:102:29: error: implicit declaration of function ‘devm_regmap_field_alloc’ [-Werror=implicit-function-declaration]
102 | fields[i] = devm_regmap_field_alloc(dev, regmap, field);
../drivers/mux/mmio.c:76:34: warning: unused variable ‘field’ [-Wunused-variable]
76 | struct reg_field field;

Most drivers that use REGMAP select it, but trying to use 'select' here causes a ton of recursive/circular dependency chains, so just use "depends on" to prevent the build errors.

Fixes 73726380a26f ("mux: mmio-based syscon mux controller")
Cc Philipp Zabel <[email protected]>
Cc Peter Rosin <[email protected]>
---
 drivers/mux/Kconfig |    1 +
 1 file changed, 1 insertion(+)
drivers/mux/Kconfig +1 -0
@@ -48,6 +48,7 @@ config MUX_GPIO
 config MUX_MMIO
 	tristate "MMIO/Regmap register bitfield-controlled Multiplexer"
 	depends on OF || COMPILE_TEST
+	depends on REGMAP
 	help
 	  MMIO/Regmap register bitfield-controlled Multiplexer controller.