From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@barebox.org>
Subject: [PATCH 17/19] treewide: rename dev_platform_ioremap_resource() to devm_platform_ioremap_resource()
Date: Wed, 28 Oct 2026 10:14:51 +0100 [thread overview]
Message-ID: <20261028092442.3300753-18-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20261028092442.3300753-1-a.fatoum@pengutronix.de>
From: Ahmad Fatoum <a.fatoum@barebox.org>
Now that it's device-managed, give dev_platform_ioremap_resource() the
Linux name, so ported drivers can use it unchanged.
Assisted-by: Claude:opus-5-1m
Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
---
drivers/base/devres.c | 6 +++---
drivers/hw_random/atmel-rng.c | 2 +-
drivers/hw_random/bcm2835-rng.c | 2 +-
drivers/hw_random/iproc-rng200.c | 2 +-
drivers/hw_random/omap-rng.c | 2 +-
drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c | 2 +-
drivers/pmdomain/imx/imx8mp-blk-ctrl.c | 2 +-
drivers/pmdomain/imx/imx93-blk-ctrl.c | 2 +-
drivers/pmdomain/imx/imx93-pd.c | 2 +-
drivers/pwm/pwm-imx-tpm.c | 2 +-
drivers/pwm/pwm-rockchip.c | 2 +-
drivers/usb/dwc3/dwc3-imx8mp.c | 2 +-
include/linux/device.h | 2 +-
13 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/drivers/base/devres.c b/drivers/base/devres.c
index f68b8e7b6590..cfa6cd3e3d9e 100644
--- a/drivers/base/devres.c
+++ b/drivers/base/devres.c
@@ -207,7 +207,7 @@ struct resource *devm_request_mem_resource(struct device *dev, int num)
EXPORT_SYMBOL(devm_request_mem_resource);
/**
- * dev_platform_ioremap_resource() - request and map resource 'num' for a device
+ * devm_platform_ioremap_resource() - request and map resource 'num' for a device
* @dev: device to request the memory resource for
* @num: index of the memory resource
*
@@ -216,7 +216,7 @@ EXPORT_SYMBOL(devm_request_mem_resource);
*
* Return: a pointer to the registers or an ERR_PTR() on failure.
*/
-void __iomem *dev_platform_ioremap_resource(struct device *dev, int num)
+void __iomem *devm_platform_ioremap_resource(struct device *dev, int num)
{
struct resource *res;
@@ -235,4 +235,4 @@ void __iomem *dev_platform_ioremap_resource(struct device *dev, int num)
return IOMEM(res->start);
}
-EXPORT_SYMBOL(dev_platform_ioremap_resource);
+EXPORT_SYMBOL(devm_platform_ioremap_resource);
diff --git a/drivers/hw_random/atmel-rng.c b/drivers/hw_random/atmel-rng.c
index bdd2139b08a5..0c6355b3d83c 100644
--- a/drivers/hw_random/atmel-rng.c
+++ b/drivers/hw_random/atmel-rng.c
@@ -106,7 +106,7 @@ static int atmel_trng_probe(struct device *dev)
if (!trng)
return -ENOMEM;
- trng->base = dev_platform_ioremap_resource(dev, 0);
+ trng->base = devm_platform_ioremap_resource(dev, 0);
if (IS_ERR(trng->base))
return PTR_ERR(trng->base);
diff --git a/drivers/hw_random/bcm2835-rng.c b/drivers/hw_random/bcm2835-rng.c
index d82331c950d2..76d3c13335f0 100644
--- a/drivers/hw_random/bcm2835-rng.c
+++ b/drivers/hw_random/bcm2835-rng.c
@@ -146,7 +146,7 @@ static int bcm2835_rng_probe(struct device *dev)
return -ENOMEM;
/* map peripheral */
- priv->base = dev_platform_ioremap_resource(dev, 0);
+ priv->base = devm_platform_ioremap_resource(dev, 0);
if (IS_ERR(priv->base))
return PTR_ERR(priv->base);
diff --git a/drivers/hw_random/iproc-rng200.c b/drivers/hw_random/iproc-rng200.c
index 4cb3573a7d20..22cdeebeba46 100644
--- a/drivers/hw_random/iproc-rng200.c
+++ b/drivers/hw_random/iproc-rng200.c
@@ -169,7 +169,7 @@ static int iproc_rng200_probe(struct device *dev)
return -ENOMEM;
/* Map peripheral */
- priv->base = dev_platform_ioremap_resource(dev, 0);
+ priv->base = devm_platform_ioremap_resource(dev, 0);
if (IS_ERR(priv->base)) {
dev_err(dev, "failed to remap rng regs\n");
return PTR_ERR(priv->base);
diff --git a/drivers/hw_random/omap-rng.c b/drivers/hw_random/omap-rng.c
index e6974d7769f4..7a299f49a523 100644
--- a/drivers/hw_random/omap-rng.c
+++ b/drivers/hw_random/omap-rng.c
@@ -373,7 +373,7 @@ static int omap_rng_probe(struct device *dev)
dev->priv = priv;
priv->dev = dev;
- priv->base = dev_platform_ioremap_resource(dev, 0);
+ priv->base = devm_platform_ioremap_resource(dev, 0);
if (IS_ERR(priv->base)) {
ret = PTR_ERR(priv->base);
goto err_ioremap;
diff --git a/drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c b/drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c
index 161c9d7c0d1c..905d292816c7 100644
--- a/drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c
+++ b/drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c
@@ -698,7 +698,7 @@ static int inno_dsidphy_probe(struct device *dev)
inno->pdata = device_get_match_data(inno->dev);
dev_set_drvdata(dev, inno);
- inno->phy_base = dev_platform_ioremap_resource(dev, 0);
+ inno->phy_base = devm_platform_ioremap_resource(dev, 0);
if (IS_ERR(inno->phy_base))
return PTR_ERR(inno->phy_base);
diff --git a/drivers/pmdomain/imx/imx8mp-blk-ctrl.c b/drivers/pmdomain/imx/imx8mp-blk-ctrl.c
index 3db26e91b31b..9f32bed5a319 100644
--- a/drivers/pmdomain/imx/imx8mp-blk-ctrl.c
+++ b/drivers/pmdomain/imx/imx8mp-blk-ctrl.c
@@ -409,7 +409,7 @@ static int imx8mp_blk_ctrl_probe(struct device *dev)
bc_data = of_device_get_match_data(dev);
num_domains = bc_data->num_domains;
- base = dev_platform_ioremap_resource(dev, 0);
+ base = devm_platform_ioremap_resource(dev, 0);
if (IS_ERR(base))
return PTR_ERR(base);
diff --git a/drivers/pmdomain/imx/imx93-blk-ctrl.c b/drivers/pmdomain/imx/imx93-blk-ctrl.c
index 242e3047fc0c..1d296023d2f6 100644
--- a/drivers/pmdomain/imx/imx93-blk-ctrl.c
+++ b/drivers/pmdomain/imx/imx93-blk-ctrl.c
@@ -208,7 +208,7 @@ static int imx93_blk_ctrl_probe(struct device *dev)
bc_data = of_device_get_match_data(dev);
- base = dev_platform_ioremap_resource(dev, 0);
+ base = devm_platform_ioremap_resource(dev, 0);
if (IS_ERR(base))
return PTR_ERR(base);
diff --git a/drivers/pmdomain/imx/imx93-pd.c b/drivers/pmdomain/imx/imx93-pd.c
index 3222fc17e9d0..faab1bcb7c80 100644
--- a/drivers/pmdomain/imx/imx93-pd.c
+++ b/drivers/pmdomain/imx/imx93-pd.c
@@ -93,7 +93,7 @@ static int imx93_pd_probe(struct device *dev)
if (!domain)
return -ENOMEM;
- domain->addr = dev_platform_ioremap_resource(dev, 0);
+ domain->addr = devm_platform_ioremap_resource(dev, 0);
if (IS_ERR(domain->addr))
return PTR_ERR(domain->addr);
diff --git a/drivers/pwm/pwm-imx-tpm.c b/drivers/pwm/pwm-imx-tpm.c
index f2b0b8b9038e..9d71b5113b88 100644
--- a/drivers/pwm/pwm-imx-tpm.c
+++ b/drivers/pwm/pwm-imx-tpm.c
@@ -352,7 +352,7 @@ static int pwm_imx_tpm_probe(struct device *dev)
u32 val;
int i;
- base = dev_platform_ioremap_resource(dev, 0);
+ base = devm_platform_ioremap_resource(dev, 0);
if (IS_ERR(base))
return PTR_ERR(base);
diff --git a/drivers/pwm/pwm-rockchip.c b/drivers/pwm/pwm-rockchip.c
index b302a84d5f3f..9b208467f2ee 100644
--- a/drivers/pwm/pwm-rockchip.c
+++ b/drivers/pwm/pwm-rockchip.c
@@ -261,7 +261,7 @@ static int rockchip_pwm_probe(struct device *dev)
if (!pc)
return -ENOMEM;
- pc->base = dev_platform_ioremap_resource(dev, 0);
+ pc->base = devm_platform_ioremap_resource(dev, 0);
if (IS_ERR(pc->base))
return PTR_ERR(pc->base);
diff --git a/drivers/usb/dwc3/dwc3-imx8mp.c b/drivers/usb/dwc3/dwc3-imx8mp.c
index d165b95a2eec..71bcd68b0a31 100644
--- a/drivers/usb/dwc3/dwc3-imx8mp.c
+++ b/drivers/usb/dwc3/dwc3-imx8mp.c
@@ -109,7 +109,7 @@ static int dwc3_imx8mp_probe(struct device *dev)
dwc3_imx->dev = dev;
- dwc3_imx->hsio_blk_base = dev_platform_ioremap_resource(dev, 0);
+ dwc3_imx->hsio_blk_base = devm_platform_ioremap_resource(dev, 0);
if (IS_ERR(dwc3_imx->hsio_blk_base))
return PTR_ERR(dwc3_imx->hsio_blk_base);
diff --git a/include/linux/device.h b/include/linux/device.h
index 2b33580cd573..6654bf97f91d 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -146,7 +146,7 @@ static inline int devm_add_action_or_reset(struct device *dev,
#define driver_unregister unregister_driver
-void __iomem *dev_platform_ioremap_resource(struct device *dev, int num);
+void __iomem *devm_platform_ioremap_resource(struct device *dev, int num);
static inline void __iomem *devm_ioremap(struct device *dev,
resource_size_t start,
--
2.47.3
next prev parent reply other threads:[~2026-10-28 9:29 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-28 9:14 [PATCH 00/19] driver: add devm_ support Ahmad Fatoum
2026-10-28 9:14 ` [PATCH 01/19] commands: devunbind: refuse to unbind devices that were never bound Ahmad Fatoum
2026-10-28 9:14 ` [PATCH 02/19] commands: devunbind: don't poison the active list entry Ahmad Fatoum
2026-10-28 9:14 ` [PATCH 03/19] talloc: remove unused talloc_steal() and talloc_steal_children() Ahmad Fatoum
2026-10-28 9:14 ` [PATCH 04/19] talloc: free children in a loop Ahmad Fatoum
2026-10-28 9:14 ` [PATCH 05/19] talloc: add support for destructors Ahmad Fatoum
2026-10-28 9:14 ` [PATCH 06/19] test: self: talloc: add destructor tests Ahmad Fatoum
2026-10-28 9:14 ` [PATCH 07/19] talloc: add talloc_run_destructors() Ahmad Fatoum
2026-10-28 9:14 ` [PATCH 08/19] mfd: pca9450: don't free device-managed memory in probe error path Ahmad Fatoum
2026-10-28 9:14 ` [PATCH 09/19] video: backlight-pwm: allocate brightness levels with devm_kcalloc Ahmad Fatoum
2026-10-28 9:14 ` [PATCH 10/19] driver: implement devm_ allocation helpers on top of talloc Ahmad Fatoum
2026-10-28 9:14 ` [PATCH 11/19] devres: Provide kmalloc_obj*-style API for devm_kmalloc Ahmad Fatoum
2026-10-28 9:14 ` [PATCH 12/19] memory: atmel-ebi: use generic devm_kzalloc() Ahmad Fatoum
2026-10-28 9:14 ` [PATCH 13/19] driver: add devm_add_action() Ahmad Fatoum
2026-10-28 9:14 ` [PATCH 14/19] test: self: add devm_ selftest Ahmad Fatoum
2026-10-28 9:14 ` [PATCH 15/19] driver: add devm_request_mem_resource() Ahmad Fatoum
2026-10-28 9:14 ` [PATCH 16/19] driver: make dev_platform_ioremap_resource() device-managed Ahmad Fatoum
2026-10-28 9:14 ` Ahmad Fatoum [this message]
2026-10-28 9:14 ` [PATCH 18/19] driver: make dev_platform_get_and_ioremap_resource() device-managed Ahmad Fatoum
2026-10-28 9:14 ` [PATCH 19/19] serial: stm32: request the registers with devm_request_mem_resource() Ahmad Fatoum
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=20261028092442.3300753-18-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=a.fatoum@barebox.org \
--cc=barebox@lists.infradead.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