Skip to contentSkip to conversation

stm: add configfs dependency

PATCH In review Arnd Bergmann 2 participants 2 messages Oct 16, 2015 – Oct 17, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 stm: add configfs dependency

There are three new stm modules, all of which use configfs for configuration. If configfs is not part of the kernel, or is a loadable module while the stm driver is builtin, we get a link error like:

drivers/built-in.o: In function `stp_policy_node_drop':
drivers/hwtracing/stm/policy.c:232: undefined reference to config_item_put' drivers/built-in.o: In function stp_policies_make':
drivers/hwtracing/stm/policy.c:352: undefined reference to config_group_init_type_name' drivers/built-in.o: In function stp_policy_node_make':
drivers/hwtracing/stm/policy.c:215: undefined reference to `config_group_init_type_name'

This adds explicit Kconfig dependencies to ensure configfs is present.

---
The patches are currently in Greg's char-misc tree, we should have this one in the same branch.

drivers/hwtracing/stm/Kconfig +3 -0
index 5a59a28cc3da..6df294fff1eb 100644
@@ -1,5 +1,6 @@
 config STM
 	tristate "System Trace Module devices"
+	depends on CONFIGFS_FS
 	help
 	  A System Trace Module (STM) is a device exporting data in System
 	  Trace Protocol (STP) format as defined by MIPI STP standards.
@@ -9,6 +10,7 @@ config STM
 
 config STM_DUMMY
 	tristate "Dummy STM driver"
+	depends on CONFIGFS_FS
 	help
 	  This is a simple dummy device that pretends to be an stm device
 	  and discards your data. Use for stm class testing.
@@ -17,6 +19,7 @@ config STM_DUMMY
 
 config STM_SOURCE_CONSOLE
 	tristate "Kernel console over STM devices"
+	depends on CONFIGFS_FS
 	help
 	  This is a kernel space trace source that sends kernel log
 	  messages to trace hosts over STM devices.
#1 lore raw
Quoted 23 lines · Arnd Bergmann

There are three new stm modules, all of which use configfs for configuration. If configfs is not part of the kernel, or is a loadable module while the stm driver is builtin, we get a link error like:

drivers/built-in.o: In function `stp_policy_node_drop':
drivers/hwtracing/stm/policy.c:232: undefined reference to config_item_put' drivers/built-in.o: In function stp_policies_make':
drivers/hwtracing/stm/policy.c:352: undefined reference to config_group_init_type_name' drivers/built-in.o: In function stp_policy_node_make':
drivers/hwtracing/stm/policy.c:215: undefined reference to `config_group_init_type_name'

This adds explicit Kconfig dependencies to ensure configfs is present.

---
The patches are currently in Greg's char-misc tree, we should have this one in the same branch.

drivers/hwtracing/stm/Kconfig +0 -0
index 5a59a28cc3da..6df294fff1eb 100644

drivers/hwtracing/stm/Kconfig line 3

Quoted 3 lines
drivers/hwtracing/stm/Kconfig +1 -0
@@ -1,5 +1,6 @@
 config STM
 	tristate "System Trace Module devices"
+	depends on CONFIGFS_FS

It's better to do a select here, like other drivers do, I have a patch in my queue to do that, I'll queue it up now.

thanks,

greg k-h