From: Danilo Krummrich <dakr@kernel.org>
To: gregkh@linuxfoundation.org, rafael@kernel.org
Cc: linux-kernel@vger.kernel.org, Danilo Krummrich <dakr@kernel.org>
Subject: [PATCH] driver-core: move devres_for_each_res() to base.h
Date: Mon, 19 Jan 2026 17:27:57 +0100 [thread overview]
Message-ID: <20260119162920.77189-1-dakr@kernel.org> (raw)
devres_for_each_res() is only used by .../firmware_loader/main.c, which
already includes base.h.
The usage of devres_for_each_res() by code outside of driver-core is
questionable, hence move it to base.h.
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
---
drivers/base/base.h | 4 ++++
include/linux/device/devres.h | 4 ----
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/base/base.h b/drivers/base/base.h
index 430cbefbc97f..60ee4d466b29 100644
--- a/drivers/base/base.h
+++ b/drivers/base/base.h
@@ -213,6 +213,10 @@ static inline void device_set_driver(struct device *dev, const struct device_dri
WRITE_ONCE(dev->driver, (struct device_driver *)drv);
}
+void devres_for_each_res(struct device *dev, dr_release_t release,
+ dr_match_t match, void *match_data,
+ void (*fn)(struct device *, void *, void *),
+ void *data);
int devres_release_all(struct device *dev);
void device_block_probing(void);
void device_unblock_probing(void);
diff --git a/include/linux/device/devres.h b/include/linux/device/devres.h
index 9c1e3d643d69..14ab9159bdda 100644
--- a/include/linux/device/devres.h
+++ b/include/linux/device/devres.h
@@ -26,10 +26,6 @@ __devres_alloc_node(dr_release_t release, size_t size, gfp_t gfp, int nid, const
#define devres_alloc_node(release, size, gfp, nid) \
__devres_alloc_node(release, size, gfp, nid, #release)
-void devres_for_each_res(struct device *dev, dr_release_t release,
- dr_match_t match, void *match_data,
- void (*fn)(struct device *, void *, void *),
- void *data);
void devres_free(void *res);
void devres_add(struct device *dev, void *res);
void *devres_find(struct device *dev, dr_release_t release, dr_match_t match, void *match_data);
base-commit: 744905705113a6ab4c38127f18cc0d71594cfaec
--
2.52.0
next reply other threads:[~2026-01-19 16:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-19 16:27 Danilo Krummrich [this message]
2026-01-20 15:15 ` [PATCH] driver-core: move devres_for_each_res() to base.h Greg KH
2026-01-23 10:48 ` Danilo Krummrich
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=20260119162920.77189-1-dakr@kernel.org \
--to=dakr@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
/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