Commit 22c48a43 authored by Yangtao Li's avatar Yangtao Li Committed by Rafael J. Wysocki

cpuidle: clps711x: convert to devm_platform_ioremap_resource()

Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: default avatarYangtao Li <tiny.windzz@gmail.com>
Acked-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent d1eef1c6
...@@ -37,10 +37,7 @@ static struct cpuidle_driver clps711x_idle_driver = { ...@@ -37,10 +37,7 @@ static struct cpuidle_driver clps711x_idle_driver = {
static int __init clps711x_cpuidle_probe(struct platform_device *pdev) static int __init clps711x_cpuidle_probe(struct platform_device *pdev)
{ {
struct resource *res; clps711x_halt = devm_platform_ioremap_resource(pdev, 0);
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
clps711x_halt = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(clps711x_halt)) if (IS_ERR(clps711x_halt))
return PTR_ERR(clps711x_halt); return PTR_ERR(clps711x_halt);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment