[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230119191040.1637739-2-sean.anderson@seco.com>
Date: Thu, 19 Jan 2023 14:10:37 -0500
From: Sean Anderson <sean.anderson@...o.com>
To: David Airlie <airlied@...il.com>, Daniel Vetter <daniel@...ll.ch>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>,
Thomas Zimmermann <tzimmermann@...e.de>,
dri-devel@...ts.freedesktop.org
Cc: linux-kernel@...r.kernel.org,
Sean Anderson <sean.anderson@...o.com>
Subject: [PATCH v3 1/3] component: Add helper for device nodes
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@...o.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
Powered by blists - more mailing lists