2021-09-08 07:20:24

by Cai,Huoqing

[permalink] [raw]
Subject: [PATCH] soc: tegra: pmc: Make use of the helper function devm_platform_ioremap_resource()

Use the devm_platform_ioremap_resource() helper instead of
calling platform_get_resource() and devm_ioremap_resource()
separately

Signed-off-by: Cai Huoqing <[email protected]>
---
drivers/soc/tegra/pmc.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/soc/tegra/pmc.c b/drivers/soc/tegra/pmc.c
index 50091c4ec948..24683e11ac9b 100644
--- a/drivers/soc/tegra/pmc.c
+++ b/drivers/soc/tegra/pmc.c
@@ -2815,8 +2815,7 @@ static int tegra_pmc_probe(struct platform_device *pdev)
return err;

/* take over the memory region from the early initialization */
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- base = devm_ioremap_resource(&pdev->dev, res);
+ base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(base))
return PTR_ERR(base);

--
2.25.1


2021-10-07 18:53:39

by Thierry Reding

[permalink] [raw]
Subject: Re: [PATCH] soc: tegra: pmc: Make use of the helper function devm_platform_ioremap_resource()

On Wed, Sep 08, 2021 at 03:17:24PM +0800, Cai Huoqing wrote:
> Use the devm_platform_ioremap_resource() helper instead of
> calling platform_get_resource() and devm_ioremap_resource()
> separately
>
> Signed-off-by: Cai Huoqing <[email protected]>
> ---
> drivers/soc/tegra/pmc.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)

Applied, thanks.

Thierry


Attachments:
(No filename) (383.00 B)
signature.asc (849.00 B)
Download all attachments