Commit 06b29212 authored by Tang Bin's avatar Tang Bin Committed by Krzysztof Kozlowski

ARM: samsung: Use devm_platform_ioremap_resource() to simplify code

Use devm_platform_ioremap_resource() instead of
platform_get_resource() + devm_ioremap_resource().
Signed-off-by: default avatarShengju Zhang <zhangshengju@cmss.chinamobile.com>
Signed-off-by: default avatarTang Bin <tangbin@cmss.chinamobile.com>
Signed-off-by: default avatarKrzysztof Kozlowski <krzk@kernel.org>
parent ee9a71ad
......@@ -333,7 +333,6 @@ static int s3c_adc_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct adc_device *adc;
struct resource *regs;
enum s3c_cpu_type cpu = platform_get_device_id(pdev)->driver_data;
int ret;
unsigned tmp;
......@@ -370,8 +369,7 @@ static int s3c_adc_probe(struct platform_device *pdev)
return PTR_ERR(adc->clk);
}
regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
adc->regs = devm_ioremap_resource(dev, regs);
adc->regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(adc->regs))
return PTR_ERR(adc->regs);
......
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