Thread (44 messages) 44 messages, 9 authors, 2020-01-03
STALE2361d

[PATCH] base: soc: Export soc_device_to_device() helper

From: Andreas Färber <afaerber@suse.de>
Date: 2019-11-11 04:57:47
Also in: lkml
Subsystem: driver core, kobjects, debugfs and sysfs, the rest · Maintainers: Greg Kroah-Hartman, "Rafael J. Wysocki", Danilo Krummrich, Linus Torvalds

Use of soc_device_to_device() in driver modules causes a build failure.
Given that the helper is nicely documented in include/linux/sys_soc.h,
let's export it as GPL symbol.

struct soc_device is local to soc.c, so it can't be inlined into the
header or into driver code.

This still handles only the case that CONFIG_SOC_BUS is enabled.
Same as commit da65a1589dacc7ec44ea0557a14d70a39d991f32 ("base: soc:
Provide a dummy implementation of soc_device_match()") we'd need to
provide a dummy inline implementation to cope with COMPILE_TEST, too.

Reported-by: kbuild test robot <redacted>
Cc: Lee Jones <redacted>
Cc: Bjorn Andersson <redacted>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 drivers/base/soc.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/drivers/base/soc.c b/drivers/base/soc.c
index 4af11a423475..72848587cd51 100644
--- a/drivers/base/soc.c
+++ b/drivers/base/soc.c
@@ -41,6 +41,7 @@ struct device *soc_device_to_device(struct soc_device *soc_dev)
 {
 	return &soc_dev->dev;
 }
+EXPORT_SYMBOL_GPL(soc_device_to_device);
 
 static umode_t soc_attribute_mode(struct kobject *kobj,
 				struct attribute *attr,
-- 
2.16.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help