[RFC 08/15] of: Add of_fwnode_handle() to convert device nodes to fwnode_handle

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



of_fwnode_handle() returns a struct fwnode_handle of the struct
device_node. This may be used on the fwnode property API.

Signed-off-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx>
---
 include/linux/of.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/include/linux/of.h b/include/linux/of.h
index 3d9ff8e..c9a7962 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -159,6 +159,11 @@ static inline struct device_node *to_of_node(struct fwnode_handle *fwnode)
 		container_of(fwnode, struct device_node, fwnode) : NULL;
 }
 
+static inline struct fwnode_handle *of_fwnode_handle(struct device_node *node)
+{
+	return &node->fwnode;
+}
+
 static inline bool of_have_populated_dt(void)
 {
 	return of_root != NULL;
@@ -481,6 +486,11 @@ static inline struct device_node *of_find_node_with_property(
 	return NULL;
 }
 
+static inline struct fwnode_handle *of_fwnode_handle(struct device_node *node)
+{
+	return NULL;
+}
+
 static inline bool of_have_populated_dt(void)
 {
 	return false;
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux