summaryrefslogtreecommitdiffstats
path: root/drivers/devfreq
diff options
context:
space:
mode:
authorMinghao Chi <chi.minghao@zte.com.cn>2022-11-22 09:42:28 +0800
committerChanwoo Choi <cw00.choi@samsung.com>2022-12-05 21:57:20 +0900
commit7fc7f25419f5a6b09199ba4b5026b94ef184fa79 (patch)
tree75ba052343d2c3ffe5f8226e186fdcb27e30fbac /drivers/devfreq
parentad44c2fd0e22910080e7761fb889c6c6c8c914d8 (diff)
downloadlinux-7fc7f25419f5a6b09199ba4b5026b94ef184fa79.tar.gz
linux-7fc7f25419f5a6b09199ba4b5026b94ef184fa79.tar.bz2
linux-7fc7f25419f5a6b09199ba4b5026b94ef184fa79.zip
PM / devfreq: event: 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: Minghao Chi <chi.minghao@zte.com.cn> Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Diffstat (limited to 'drivers/devfreq')
-rw-r--r--drivers/devfreq/event/exynos-nocp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/devfreq/event/exynos-nocp.c b/drivers/devfreq/event/exynos-nocp.c
index ccc531ee6938..c1cc23bcb995 100644
--- a/drivers/devfreq/event/exynos-nocp.c
+++ b/drivers/devfreq/event/exynos-nocp.c
@@ -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);