pwm: vt8500: Convert to devm_platform_ioremap_resource()
Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li <tiny.windzz@gmail.com> Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
This commit is contained in:
Родитель
05baa59601
Коммит
4906bf5482
|
@ -193,7 +193,6 @@ MODULE_DEVICE_TABLE(of, vt8500_pwm_dt_ids);
|
|||
static int vt8500_pwm_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct vt8500_chip *chip;
|
||||
struct resource *r;
|
||||
struct device_node *np = pdev->dev.of_node;
|
||||
int ret;
|
||||
|
||||
|
@ -219,8 +218,7 @@ static int vt8500_pwm_probe(struct platform_device *pdev)
|
|||
return PTR_ERR(chip->clk);
|
||||
}
|
||||
|
||||
r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
chip->base = devm_ioremap_resource(&pdev->dev, r);
|
||||
chip->base = devm_platform_ioremap_resource(pdev, 0);
|
||||
if (IS_ERR(chip->base))
|
||||
return PTR_ERR(chip->base);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче