summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-09-24 16:04:12 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2017-09-24 16:04:12 -0700
commit6e7f253801a2c7e6274b702e5cbda78b89122470 (patch)
treefc1649add5c2cab2acc73856a95c0518da6b6c47 /include
parenta141fd55f26231b5a17f74e504c56d44c3e62e5d (diff)
parent127b8e2692b6c145955bb71e482ca1bc6ce10027 (diff)
downloadlinux-6e7f253801a2c7e6274b702e5cbda78b89122470.tar.gz
linux-6e7f253801a2c7e6274b702e5cbda78b89122470.tar.bz2
linux-6e7f253801a2c7e6274b702e5cbda78b89122470.zip
Merge tag 'devicetree-fixes-for-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux
Pull DeviceTree fixes from Rob Herring: - fix build for !OF providing empty of_find_device_by_node - fix Abracon vendor prefix - sync dtx_diff include paths (again) - a stm32h7 clock binding doc fix * tag 'devicetree-fixes-for-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: dt-bindings: clk: stm32h7: fix clock-cell size scripts/dtc: dtx_diff - 2nd update of include dts paths to match build dt-bindings: fix vendor prefix for Abracon of: provide inline helper for of_find_device_by_node
Diffstat (limited to 'include')
-rw-r--r--include/linux/of_platform.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h
index e0d1946270f3..fb908e598348 100644
--- a/include/linux/of_platform.h
+++ b/include/linux/of_platform.h
@@ -57,7 +57,14 @@ extern const struct of_device_id of_default_bus_match_table[];
extern struct platform_device *of_device_alloc(struct device_node *np,
const char *bus_id,
struct device *parent);
+#ifdef CONFIG_OF
extern struct platform_device *of_find_device_by_node(struct device_node *np);
+#else
+static inline struct platform_device *of_find_device_by_node(struct device_node *np)
+{
+ return NULL;
+}
+#endif
/* Platform devices and busses creation */
extern struct platform_device *of_platform_device_create(struct device_node *np,