[PATCH v2 1/3] component: Add helper for device nodes

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

 



There is a common case where component_patch_add_release is called with
component_release_of/component_compare_of and a device node. Add a
helper.

Signed-off-by: Sean Anderson <sean.anderson@xxxxxxxx>
---

Changes in v2:
- Split off conversion from helper addition

 include/linux/component.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/include/linux/component.h b/include/linux/component.h
index df4aa75c9e7c..fb5d2dbc34d8 100644
--- a/include/linux/component.h
+++ b/include/linux/component.h
@@ -6,6 +6,7 @@
 
 
 struct device;
+struct device_node;
 
 /**
  * struct component_ops - callbacks for component drivers
@@ -128,4 +129,12 @@ static inline void component_match_add(struct device *parent,
 				    compare_data);
 }
 
+static inline void component_match_add_of(struct device *parent,
+					  struct component_match **matchptr,
+					  struct device_node *node)
+{
+	component_match_add_release(parent, matchptr, component_release_of,
+				    component_compare_of, node);
+}
+
 #endif
-- 
2.35.1.1320.gc452695387.dirty




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux