Commit 48c9996f authored by Sakari Ailus's avatar Sakari Ailus Committed by Rafael J. Wysocki

device property: Add SOFTWARE_NODE() macro for defining software nodes

Add SOFTWARE_NODE() macro in order to make defining software nodes look
nicer. This is analogous to different PROPERTY_ENTRY_*() macros for
defining properties.
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
Tested-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 693c667b
......@@ -489,6 +489,13 @@ struct software_node {
const struct property_entry *properties;
};
#define SOFTWARE_NODE(_name_, _properties_, _parent_) \
(struct software_node) { \
.name = _name_, \
.properties = _properties_, \
.parent = _parent_, \
}
bool is_software_node(const struct fwnode_handle *fwnode);
const struct software_node *
to_software_node(const struct fwnode_handle *fwnode);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment