From: Yangtao Li Date: Sun, 15 Dec 2019 13:53:15 +0000 (+0000) Subject: PM / devfreq: rockchip-dfi: Convert to devm_platform_ioremap_resource X-Git-Tag: v5.10.7~3424^2^2^2~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f0c792192753abdcb4cd18677ad28acaea23a77a;p=platform%2Fkernel%2Flinux-rpi.git PM / devfreq: rockchip-dfi: Convert to devm_platform_ioremap_resource Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Signed-off-by: Chanwoo Choi --- diff --git a/drivers/devfreq/event/rockchip-dfi.c b/drivers/devfreq/event/rockchip-dfi.c index 45b190e..9a88faa 100644 --- a/drivers/devfreq/event/rockchip-dfi.c +++ b/drivers/devfreq/event/rockchip-dfi.c @@ -177,7 +177,6 @@ static int rockchip_dfi_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct rockchip_dfi *data; - struct resource *res; struct devfreq_event_desc *desc; struct device_node *np = pdev->dev.of_node, *node; @@ -185,8 +184,7 @@ static int rockchip_dfi_probe(struct platform_device *pdev) if (!data) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - data->regs = devm_ioremap_resource(&pdev->dev, res); + data->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(data->regs)) return PTR_ERR(data->regs);