From e68d0119e3284334de5650a1ac42ef4e179f895e Mon Sep 17 00:00:00 2001 From: Heikki Krogerus Date: Fri, 15 Jan 2021 12:49:11 +0300 Subject: software node: Introduce device_add_software_node() This helper will register a software node and then assign it to device at the same time. The function will also make sure that the device can't have more than one software node. Acked-by: Felipe Balbi Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20210115094914.88401-2-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman --- include/linux/property.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/linux/property.h') diff --git a/include/linux/property.h b/include/linux/property.h index 0a9001fe7aea..b0e413dc5927 100644 --- a/include/linux/property.h +++ b/include/linux/property.h @@ -488,4 +488,7 @@ fwnode_create_software_node(const struct property_entry *properties, const struct fwnode_handle *parent); void fwnode_remove_software_node(struct fwnode_handle *fwnode); +int device_add_software_node(struct device *dev, const struct software_node *swnode); +void device_remove_software_node(struct device *dev); + #endif /* _LINUX_PROPERTY_H_ */ -- cgit