lkml.org 
[lkml]   [2023]   [Jan]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v3 1/3] component: Add helper for device nodes
Date
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@seco.com>
---

(no changes since v2)

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
\
 
 \ /
  Last update: 2023-03-26 23:48    [W:0.039 / U:1.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site