summary refs log tree commit diff
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-09-17 19:39:59 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2019-09-17 19:39:59 -0700
commit35f7a95266153b1cf0caca3aa9661cb721864527 (patch)
tree670f1a57e48937cc79fa5d0fd440872273ed725a /include
parentd2aaa49e281959828370667edbc1cdcc7fc4026a (diff)
parent016049a816774edc9c3cd81afa7724d7ab001585 (diff)
downloadlinux-35f7a95266153b1cf0caca3aa9661cb721864527.tar.gz
Merge tag 'devprop-5.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull device properties framework updates from Rafael Wysocki:
 "Improve software node support (Heikki Krogerus) and clean up two
  assorted pieces of code (Andy Shevchenko, Geert Uytterhoeven)"

* tag 'devprop-5.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  software node: Initialize the return value in software_node_find_by_name()
  software node: Initialize the return value in software_node_to_swnode()
  ACPI / property: Fix acpi_graph_get_remote_endpoint() name in kerneldoc
  device property: Remove duplicate test for NULL
  platform/x86: intel_cht_int33fe: Use new API to gain access to the role switch
  usb: roles: intel_xhci: Supplying software node for the role mux
  software node: Add software_node_find_by_name()
Diffstat (limited to 'include')
-rw-r--r--include/linux/fwnode.h9
-rw-r--r--include/linux/property.h4
2 files changed, 9 insertions, 4 deletions
diff --git a/include/linux/fwnode.h b/include/linux/fwnode.h
index a11c8c56c78b..ababd6bc82f3 100644
--- a/include/linux/fwnode.h
+++ b/include/linux/fwnode.h
@@ -110,10 +110,11 @@ struct fwnode_operations {
 	(fwnode ? (fwnode_has_op(fwnode, op) ?				\
 		   (fwnode)->ops->op(fwnode, ## __VA_ARGS__) : -ENXIO) : \
 	 -EINVAL)
-#define fwnode_call_bool_op(fwnode, op, ...)				\
-	(fwnode ? (fwnode_has_op(fwnode, op) ?				\
-		   (fwnode)->ops->op(fwnode, ## __VA_ARGS__) : false) : \
-	 false)
+
+#define fwnode_call_bool_op(fwnode, op, ...)		\
+	(fwnode_has_op(fwnode, op) ?			\
+	 (fwnode)->ops->op(fwnode, ## __VA_ARGS__) : false)
+
 #define fwnode_call_ptr_op(fwnode, op, ...)		\
 	(fwnode_has_op(fwnode, op) ?			\
 	 (fwnode)->ops->op(fwnode, ## __VA_ARGS__) : NULL)
diff --git a/include/linux/property.h b/include/linux/property.h
index 5a910ad79591..9b3d4ca3a73a 100644
--- a/include/linux/property.h
+++ b/include/linux/property.h
@@ -421,6 +421,10 @@ bool is_software_node(const struct fwnode_handle *fwnode);
 const struct software_node *to_software_node(struct fwnode_handle *fwnode);
 struct fwnode_handle *software_node_fwnode(const struct software_node *node);
 
+const struct software_node *
+software_node_find_by_name(const struct software_node *parent,
+			   const char *name);
+
 int software_node_register_nodes(const struct software_node *nodes);
 void software_node_unregister_nodes(const struct software_node *nodes);