Skip to contentSkip to conversation

extcon: link devres into core module

PATCH In review Arnd Bergmann 2 participants 2 messages Jun 29, 2016 – Jun 30, 2016 External connector subsystem (extcon)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 extcon: link devres into core module

Splitting the resource-managed functions into a separate module means that the extcon core now fails to build because the internal "extcon_dev_allocate" symbol is not exported:

ERROR: extcon_dev_allocate [drivers/extcon/devres.ko] undefined!

My guess is that the intention was not to have two separate modules (which could be fixed by adding an export, plus the normal MODULE_AUTHOR/MODULE_LICENSE/... fields), but have two source files in the same module.

This fixes the Makefile accordingly, making the name of the module extcon_core.ko, which is created from building both extcon.c and devres.c.

Fixes b225d00f3ad2 ("extcon: Split out the resource-managed functions from extcon core")
---
 drivers/extcon/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/extcon/Makefile +2 -1
index 423ebc8714c5..972c813c375b 100644
@@ -2,7 +2,8 @@
 # Makefile for external connector class (extcon) devices
 #
 
-obj-$(CONFIG_EXTCON)		+= extcon.o devres.o
+obj-$(CONFIG_EXTCON)		+= extcon-core.o
+extcon-core-objs		+= extcon.o devres.o
 obj-$(CONFIG_EXTCON_ADC_JACK)	+= extcon-adc-jack.o
 obj-$(CONFIG_EXTCON_ARIZONA)	+= extcon-arizona.o
 obj-$(CONFIG_EXTCON_AXP288)	+= extcon-axp288.o
Signature · 1 line
2.9.0
maintainer
#1 lore raw

Hi Arnd,

Quoted 27 lines · Arnd Bergmann

Splitting the resource-managed functions into a separate module means that the extcon core now fails to build because the internal "extcon_dev_allocate" symbol is not exported:

ERROR: extcon_dev_allocate [drivers/extcon/devres.ko] undefined!

My guess is that the intention was not to have two separate modules (which could be fixed by adding an export, plus the normal MODULE_AUTHOR/MODULE_LICENSE/... fields), but have two source files in the same module.

This fixes the Makefile accordingly, making the name of the module extcon_core.ko, which is created from building both extcon.c and devres.c.

Fixes b225d00f3ad2 ("extcon: Split out the resource-managed functions from extcon core")
---
 drivers/extcon/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/extcon/Makefile +0 -0
index 423ebc8714c5..972c813c375b 100644

drivers/extcon/Makefile line 9

Quoted 9 lines
drivers/extcon/Makefile +2 -1
@@ -2,7 +2,8 @@
 # Makefile for external connector class (extcon) devices
 #
 
-obj-$(CONFIG_EXTCON)		+= extcon.o devres.o
+obj-$(CONFIG_EXTCON)		+= extcon-core.o
+extcon-core-objs		+= extcon.o devres.o
 obj-$(CONFIG_EXTCON_ADC_JACK)	+= extcon-adc-jack.o
 obj-$(CONFIG_EXTCON_ARIZONA)	+= extcon-arizona.o
 obj-$(CONFIG_EXTCON_AXP288)	+= extcon-axp288.o

Thanks for your fixup. Applied it.

Regards,
Chanwoo Choi