From: Minghao Chi Date: Tue, 22 Nov 2022 01:42:28 +0000 (+0800) Subject: PM / devfreq: event: use devm_platform_get_and_ioremap_resource() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=7fc7f25419f5a6b09199ba4b5026b94ef184fa79;p=linux.git 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 Signed-off-by: ye xingchen Signed-off-by: Chanwoo Choi --- diff --git a/drivers/devfreq/event/exynos-nocp.c b/drivers/devfreq/event/exynos-nocp.c index ccc531ee6938f..c1cc23bcb995c 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);