On Mon, Jan 23, 2023 at 03:46:12PM +0200, Sakari Ailus wrote: > 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: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx> > Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> Reviewed-by: Heikki Krogerus <heikki.krogerus@xxxxxxxxxxxxxxx> > --- > include/linux/property.h | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/include/linux/property.h b/include/linux/property.h > index 37179e3abad5c..6745a86bc9b97 100644 > --- a/include/linux/property.h > +++ b/include/linux/property.h > @@ -477,6 +477,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); > -- > 2.30.2 -- heikki