2023-07-05 12:34:17

by 李扬韬

[permalink] [raw]
Subject: [PATCH 1/6] soc: ti: omap-prm: Use devm_platform_get_and_ioremap_resource()

Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.

Signed-off-by: Yangtao Li <[email protected]>
---
drivers/soc/ti/omap_prm.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/soc/ti/omap_prm.c b/drivers/soc/ti/omap_prm.c
index ecd9a8bdd7c0..b2cf0a1810b9 100644
--- a/drivers/soc/ti/omap_prm.c
+++ b/drivers/soc/ti/omap_prm.c
@@ -943,10 +943,6 @@ static int omap_prm_probe(struct platform_device *pdev)
struct omap_prm *prm;
int ret;

- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!res)
- return -ENODEV;
-
data = of_device_get_match_data(&pdev->dev);
if (!data)
return -ENOTSUPP;
@@ -955,6 +951,10 @@ static int omap_prm_probe(struct platform_device *pdev)
if (!prm)
return -ENOMEM;

+ prm->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
+ if (IS_ERR(prm->base))
+ return PTR_ERR(prm->base);
+
while (data->base != res->start) {
if (!data->base)
return -EINVAL;
@@ -963,10 +963,6 @@ static int omap_prm_probe(struct platform_device *pdev)

prm->data = data;

- prm->base = devm_ioremap_resource(&pdev->dev, res);
- if (IS_ERR(prm->base))
- return PTR_ERR(prm->base);
-
ret = omap_prm_domain_init(&pdev->dev, prm);
if (ret)
return ret;
--
2.39.0



2023-07-10 05:21:50

by Bjorn Andersson

[permalink] [raw]
Subject: Re: (subset) [PATCH 1/6] soc: ti: omap-prm: Use devm_platform_get_and_ioremap_resource()


On Wed, 05 Jul 2023 20:26:39 +0800, Yangtao Li wrote:
> Convert platform_get_resource(), devm_ioremap_resource() to a single
> call to devm_platform_get_and_ioremap_resource(), as this is exactly
> what this function does.
>
>

Applied, thanks!

[3/6] soc: qcom: spm: Convert to devm_platform_ioremap_resource()
commit: 7bc1cfaee1f03008e8b1fd29e621cb50a9512263

Best regards,
--
Bjorn Andersson <[email protected]>

2023-07-21 15:57:14

by Thierry Reding

[permalink] [raw]
Subject: Re: (subset) [PATCH 1/6] soc: ti: omap-prm: Use devm_platform_get_and_ioremap_resource()

From: Thierry Reding <[email protected]>


On Wed, 05 Jul 2023 20:26:39 +0800, Yangtao Li wrote:
> Convert platform_get_resource(), devm_ioremap_resource() to a single
> call to devm_platform_get_and_ioremap_resource(), as this is exactly
> what this function does.
>
>

Applied, thanks!

[2/6] soc/tegra: fuse: Use devm_platform_get_and_ioremap_resource()
commit: 6674c9808048f28f979fc4c57994d936d477d3ed

Best regards,
--
Thierry Reding <[email protected]>

2023-07-25 11:51:32

by Nishanth Menon

[permalink] [raw]
Subject: Re: (subset) [PATCH 1/6] soc: ti: omap-prm: Use devm_platform_get_and_ioremap_resource()

Hi Yangtao Li,

On Wed, 05 Jul 2023 20:26:39 +0800, Yangtao Li wrote:
> Convert platform_get_resource(), devm_ioremap_resource() to a single
> call to devm_platform_get_and_ioremap_resource(), as this is exactly
> what this function does.
>
>

I have applied the following to branch ti-drivers-soc-next on [1].
Thank you!

[1/6] soc: ti: omap-prm: Use devm_platform_get_and_ioremap_resource()
commit: 5542c7cfc1082608959b4317ab7c3867b5f4aa7c

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent up the chain during
the next merge window (or sooner if it is a relevant bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git
--
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D