Skip to contentSkip to conversation

Input: synaptics-rmi4 - fix F03 build error when serio is module

PATCH In review Dmitry Torokhov 2 participants 2 messages Dec 27, 2016

Subsystems (2)
lore
Share & tools
lore

Dmitry Torokhov

author maintainer
#0 lore raw

PATCH 1/1 Input: synaptics-rmi4 - fix F03 build error when serio is module

Since F03 is a boolean, "depends" on symbols that can be modules do not work quite right. We can enable F03 if SERIO is built-in or if both RMI core and SERIO core are modules. If SERIO core is module, but RMI is built-in, we'll get:

drivers/built-in.o: In function `rmi_f03_attention':
rmi_f03.c:(.text+0xf8ef8): undefined reference to serio_interrupt' rmi_f03.c:(.text+0xf8fbd): undefined reference to serio_interrupt' drivers/built-in.o: In function `rmi_f03_remove':
rmi_f03.c:(.text+0xf9082): undefined reference to serio_unregister_port' drivers/built-in.o: In function rmi_f03_probe':
rmi_f03.c:(.text+0xf9260): undefined reference to `__serio_register_port'

---
 drivers/input/rmi4/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/input/rmi4/Kconfig +2 -1
index 30cc627..8993983 100644
@@ -41,7 +41,8 @@ config RMI4_SMB
 
 config RMI4_F03
         bool "RMI4 Function 03 (PS2 Guest)"
-        depends on RMI4_CORE && SERIO
+	depends on RMI4_CORE
+	depends on SERIO=y || RMI4_CORE=SERIO
         help
           Say Y here if you want to add support for RMI4 function 03.
 
Signature · 5 lines
2.8.0.rc3.226.g39d4020


-- 
Dmitry
Reviewed-by on v1 1/1
#1 lore raw
Quoted 13 lines · Dmitry Torokhov

Since F03 is a boolean, "depends" on symbols that can be modules do not work quite right. We can enable F03 if SERIO is built-in or if both RMI core and SERIO core are modules. If SERIO core is module, but RMI is built-in, we'll get:

drivers/built-in.o: In function `rmi_f03_attention':
rmi_f03.c:(.text+0xf8ef8): undefined reference to serio_interrupt' rmi_f03.c:(.text+0xf8fbd): undefined reference to serio_interrupt' drivers/built-in.o: In function `rmi_f03_remove':
rmi_f03.c:(.text+0xf9082): undefined reference to serio_unregister_port' drivers/built-in.o: In function rmi_f03_probe':
rmi_f03.c:(.text+0xf9260): undefined reference to `__serio_register_port'

Quoted 2 lines
Quoted 24 lines
---
 drivers/input/rmi4/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/input/rmi4/Kconfig +2 -1
index 30cc627..8993983 100644
@@ -41,7 +41,8 @@ config RMI4_SMB
 
 config RMI4_F03
         bool "RMI4 Function 03 (PS2 Guest)"
-        depends on RMI4_CORE && SERIO
+	depends on RMI4_CORE
+	depends on SERIO=y || RMI4_CORE=SERIO
         help
           Say Y here if you want to add support for RMI4 function 03.
 
Signature · 5 lines
2.8.0.rc3.226.g39d4020


-- 
Dmitry