Commit 85c3ebd4 authored by Yangtao Li's avatar Yangtao Li Committed by Rafael J. Wysocki

cpuidle: kirkwood: convert to devm_platform_ioremap_resource()

Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: default avatarYangtao Li <tiny.windzz@gmail.com>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Acked-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 22c48a43
...@@ -55,10 +55,7 @@ static struct cpuidle_driver kirkwood_idle_driver = { ...@@ -55,10 +55,7 @@ static struct cpuidle_driver kirkwood_idle_driver = {
/* Initialize CPU idle by registering the idle states */ /* Initialize CPU idle by registering the idle states */
static int kirkwood_cpuidle_probe(struct platform_device *pdev) static int kirkwood_cpuidle_probe(struct platform_device *pdev)
{ {
struct resource *res; ddr_operation_base = devm_platform_ioremap_resource(pdev, 0);
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
ddr_operation_base = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(ddr_operation_base)) if (IS_ERR(ddr_operation_base))
return PTR_ERR(ddr_operation_base); return PTR_ERR(ddr_operation_base);
......
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