mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-17 22:05:08 +00:00
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: Shengju Zhang <zhangshengju@cmss.chinamobile.com> Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
This commit is contained in:
parent
ee9a71ad25
commit
06b29212c3
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user