mux: fix build-error when mux-core is built as module
PATCH 1/1 mux: fix build-error when mux-core is built as module
The mux core header file uses ifdef CONFIG_MULTIPLEXER to select between helper function prototypes and static inline stubs.
This leads to build errors when CONFIG_MULTIPLEXER=m, because then CONFIG_MULTIPLEXER_MODULE is defined instead.
Replace the ifdef with IS_ENABLED to catch both builtin and module cases, and fix the build error in module case.
--- include/linux/mux/consumer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/mux/consumer.h +1 -1
@@ -16,7 +16,7 @@ struct device;struct mux_control ;struct mux_state ; -#ifdef CONFIG_MULTIPLEXER +#if IS_ENABLED (CONFIG_MULTIPLEXER )unsigned int mux_control_states (struct mux_control *mux); int __must_check mux_control_select_delay(struct mux_control *mux,
---
base-commit: 13dc45d829d5ae06f6eee3fbd3cd1f6818c08e48
change-id: 20260209-rz-sdio-mux-fix-e8fa9c62ff95
Best regards,
Signature · 1 line
Josua Mayer <[email protected]>
Quoted 4 lines · Josua Mayer
The mux core header file uses ifdef
CONFIG_MULTIPLEXERto select between helper function prototypes and static inline stubs.
Quoted 8 lines
This leads to build errors when
CONFIG_MULTIPLEXER=m, because thenCONFIG_MULTIPLEXER_MODULEis defined instead.Replace the ifdef with
IS_ENABLEDto catch both builtin and module cases, and fix the build error in module case.Fixes ad314348ceb4 ("mux: Add helper functions for getting optional and selected mux-state")Signed-off-by Josua Mayer <[email protected]>
Peter, do you intend to pick this up as a fix for v7.0-rc1? Otherwise, I am of course happy to help with it!
Kind regards
Uffe
Quoted 27 lines
--- include/linux/mux/consumer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/linux/mux/consumer.h +1
-2@@ -16,7 +16,7 @@ struct device;struct mux_control ;struct mux_state ; -#ifdef CONFIG_MULTIPLEXER +#if IS_ENABLED (CONFIG_MULTIPLEXER )unsigned int mux_control_states (struct mux_control *mux); int __must_check mux_control_select_delay(struct mux_control *mux, ---base-commit:
13dc45d829d5ae06f6eee3fbd3cd1f6818c08e48
change-id: 20260209-rz-sdio-mux-fix-e8fa9c62ff95Best regards,
--
Josua Mayer <[email protected]>
Peter Rosin
Acked-byHi!
Quoted 5 lines · Ulf Hansson
Quoted 4 lines · Josua Mayer
The mux core header file uses ifdef
CONFIG_MULTIPLEXERto select between helper function prototypes and static inline stubs.
Quoted 8 lines
Quoted 8 lines
This leads to build errors when
CONFIG_MULTIPLEXER=m, because thenCONFIG_MULTIPLEXER_MODULEis defined instead.Replace the ifdef with
IS_ENABLEDto catch both builtin and module cases, and fix the build error in module case.Fixes ad314348ceb4 ("mux: Add helper functions for getting optional and selected mux-state")Signed-off-by Josua Mayer <[email protected]>
Quoted 3 lines
Peter, do you intend to pick this up as a fix for v7.0-rc1? Otherwise, I am of course happy to help with it!
Be my guest :-)
Thanks,
Peter
Quoted 4 lines · Josua Mayer
The mux core header file uses ifdef
CONFIG_MULTIPLEXERto select between helper function prototypes and static inline stubs.
Quoted 8 lines
This leads to build errors when
CONFIG_MULTIPLEXER=m, because thenCONFIG_MULTIPLEXER_MODULEis defined instead.Replace the ifdef with
IS_ENABLEDto catch both builtin and module cases, and fix the build error in module case.Fixes ad314348ceb4 ("mux: Add helper functions for getting optional and selected mux-state")Signed-off-by Josua Mayer <[email protected]>
Applied for next (as a fix for v7.0-rc1), thanks!
Kind regards
Uffe
Quoted 27 lines
--- include/linux/mux/consumer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/linux/mux/consumer.h +1
-2@@ -16,7 +16,7 @@ struct device;struct mux_control ;struct mux_state ; -#ifdef CONFIG_MULTIPLEXER +#if IS_ENABLED (CONFIG_MULTIPLEXER )unsigned int mux_control_states (struct mux_control *mux); int __must_check mux_control_select_delay(struct mux_control *mux, ---base-commit:
13dc45d829d5ae06f6eee3fbd3cd1f6818c08e48
change-id: 20260209-rz-sdio-mux-fix-e8fa9c62ff95Best regards,
--
Josua Mayer <[email protected]>