PM / devfreq: event: use devm_platform_get_and_ioremap_resource()
PATCH 1/1 PM / devfreq: event: use devm_platform_get_and_ioremap_resource()
From: Minghao Chi <[email protected]>
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 Minghao Chi <[email protected]>
Signed-off-by ye xingchen <[email protected]>
--- drivers/devfreq/event/exynos-nocp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/devfreq/event/exynos-nocp.c +1 -2
@@ -214,8 +214,7 @@ static int exynos_nocp_parse_dt(struct platform_device *pdev, nocp->clk =NULL ;/* Maps the memory mapped IO to control nocp register */ - res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); - base =devm_ioremap_resource (dev, res); + base =devm_platform_get_and_ioremap_resource (pdev,0 , &res);if (IS_ERR (base))return PTR_ERR (base);
Signature · 1 line
2.25.1
Chanwoo Choi
AppliedQuoted 17 lines · On 22. 11. 22. 10:42, [email protected] wrote:
From: Minghao Chi <[email protected]>
Convert
platform_get_resource(),devm_ioremap_resource()to a single call todevm_platform_get_and_ioremap_resource(), as this is exactly what this function does.Signed-off-by Minghao Chi <[email protected]>Signed-off-by ye xingchen <[email protected]>--- drivers/devfreq/event/exynos-nocp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/devfreq/event/exynos-nocp.c +0
-0
drivers/devfreq/event/exynos-nocp.c static int exynos_nocp_parse_dt(struct platform_device *pdev, · line 220
Quoted 9 lines
drivers/devfreq/event/exynos-nocp.c +1
-2@@ -214,8 +214,7 @@ static int exynos_nocp_parse_dt(struct platform_device *pdev, nocp->clk =NULL ;/* Maps the memory mapped IO to control nocp register */ - res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); - base =devm_ioremap_resource (dev, res); + base =devm_platform_get_and_ioremap_resource (pdev,0 , &res);if (IS_ERR (base))return PTR_ERR (base);
Applied it. Thanks.
Signature · 3 lines
Best Regards, Samsung Electronics Chanwoo Choi