Commit 4906bf54 authored by Yangtao Li's avatar Yangtao Li Committed by Thierry Reding

pwm: vt8500: 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 avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
parent 05baa596
...@@ -193,7 +193,6 @@ MODULE_DEVICE_TABLE(of, vt8500_pwm_dt_ids); ...@@ -193,7 +193,6 @@ MODULE_DEVICE_TABLE(of, vt8500_pwm_dt_ids);
static int vt8500_pwm_probe(struct platform_device *pdev) static int vt8500_pwm_probe(struct platform_device *pdev)
{ {
struct vt8500_chip *chip; struct vt8500_chip *chip;
struct resource *r;
struct device_node *np = pdev->dev.of_node; struct device_node *np = pdev->dev.of_node;
int ret; int ret;
...@@ -219,8 +218,7 @@ static int vt8500_pwm_probe(struct platform_device *pdev) ...@@ -219,8 +218,7 @@ static int vt8500_pwm_probe(struct platform_device *pdev)
return PTR_ERR(chip->clk); return PTR_ERR(chip->clk);
} }
r = platform_get_resource(pdev, IORESOURCE_MEM, 0); chip->base = devm_platform_ioremap_resource(pdev, 0);
chip->base = devm_ioremap_resource(&pdev->dev, r);
if (IS_ERR(chip->base)) if (IS_ERR(chip->base))
return PTR_ERR(chip->base); return PTR_ERR(chip->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