diff options
author | Yangtao Li <tiny.windzz@gmail.com> | 2019-12-15 14:53:15 +0100 |
---|---|---|
committer | Chanwoo Choi <cw00.choi@samsung.com> | 2019-12-30 01:59:06 +0100 |
commit | f0c792192753abdcb4cd18677ad28acaea23a77a (patch) | |
tree | 956c8daceaec112bdd28adb2270777c2bd69ed7f /drivers/devfreq | |
parent | PM / devfreq: rk3399_dmc: Add missing of_node_put() (diff) | |
download | linux-f0c792192753abdcb4cd18677ad28acaea23a77a.tar.xz linux-f0c792192753abdcb4cd18677ad28acaea23a77a.zip |
PM / devfreq: rockchip-dfi: Convert to devm_platform_ioremap_resource
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Diffstat (limited to 'drivers/devfreq')
-rw-r--r-- | drivers/devfreq/event/rockchip-dfi.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/devfreq/event/rockchip-dfi.c b/drivers/devfreq/event/rockchip-dfi.c index 45b190e443d8..9a88faaf8b27 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); |