[PATCH 5/7] of: provide of_node_get and of_node_put stubs
Ahmad Fatoum
a.fatoum at pengutronix.de
Mon Jan 9 07:11:50 PST 2023
While removal of of_node_get and of_node_put can simplify ported kernel
code, on the other hand, they can be more of a hassle with future syncs
of the driver. Just provide stubs for them, so they can be left in.
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
include/of.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/include/of.h b/include/of.h
index f22730c081fe..4f4e9248ada9 100644
--- a/include/of.h
+++ b/include/of.h
@@ -101,6 +101,11 @@ static inline const void *of_property_get_value(const struct property *pp)
return pp->value ? pp->value : pp->value_const;
}
+static inline struct device_node *of_node_get(struct device_node *node)
+{
+ return node;
+}
+static inline void of_node_put(struct device_node *node) { }
void of_print_property(const void *data, int len);
void of_print_cmdline(struct device_node *root);
--
2.30.2
More information about the barebox
mailing list