mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
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:
committed by
Thierry Reding
parent
05baa59601
commit
4906bf5482
@@ -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)
|
|||||||
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);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user