From: Sean Anderson <sean.anderson@seco.com>
To: David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org, Sean Anderson <sean.anderson@seco.com>
Subject: [PATCH v2 1/3] component: Add helper for device nodes
Date: Thu, 22 Dec 2022 18:37:57 -0500 [thread overview]
Message-ID: <20221222233759.1934852-2-sean.anderson@seco.com> (raw)
In-Reply-To: <20221222233759.1934852-1-sean.anderson@seco.com>
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>
---
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
next prev parent reply other threads:[~2022-12-22 23:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-22 23:37 [PATCH v2 0/3] drm: Add component_match_add_of and convert users of drm_of_component_match_add Sean Anderson
2022-12-22 23:37 ` Sean Anderson [this message]
2022-12-22 23:37 ` [PATCH v2 2/3] iommu/sound: Use component_match_add_of helper Sean Anderson
2023-01-03 13:01 ` Robin Murphy
2023-01-03 16:15 ` Maxime Ripard
2023-01-03 16:24 ` Sean Anderson
2023-01-03 16:39 ` Robin Murphy
2022-12-22 23:37 ` [PATCH v2 3/3] drm: Convert users of drm_of_component_match_add to component_match_add_of Sean Anderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221222233759.1934852-2-sean.anderson@seco.com \
--to=sean.anderson@seco.com \
--cc=airlied@gmail.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®