diff options
author | Yangtao Li <tiny.windzz@gmail.com> | 2019-12-29 08:05:59 +0000 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2020-12-17 14:18:44 +0100 |
commit | 1dcf0523fdb37b0b0d97b07dacce6b99b4d3c0ce (patch) | |
tree | 9fad1a9fc68321973f2579b9ee6093e67470f7e0 /drivers/pwm/pwm-tiecap.c | |
parent | 860b1ca0eabc8c2199c5edd9226f214b085c3f9b (diff) | |
download | linux-stable-1dcf0523fdb37b0b0d97b07dacce6b99b4d3c0ce.tar.gz linux-stable-1dcf0523fdb37b0b0d97b07dacce6b99b4d3c0ce.tar.bz2 linux-stable-1dcf0523fdb37b0b0d97b07dacce6b99b4d3c0ce.zip |
pwm: tiecap: 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>
Diffstat (limited to 'drivers/pwm/pwm-tiecap.c')
-rw-r--r-- | drivers/pwm/pwm-tiecap.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/pwm/pwm-tiecap.c b/drivers/pwm/pwm-tiecap.c index 683804c7d26c..2a8949014bb1 100644 --- a/drivers/pwm/pwm-tiecap.c +++ b/drivers/pwm/pwm-tiecap.c @@ -196,7 +196,6 @@ static int ecap_pwm_probe(struct platform_device *pdev) { struct device_node *np = pdev->dev.of_node; struct ecap_pwm_chip *pc; - struct resource *r; struct clk *clk; int ret; @@ -230,8 +229,7 @@ static int ecap_pwm_probe(struct platform_device *pdev) pc->chip.base = -1; pc->chip.npwm = 1; - r = platform_get_resource(pdev, IORESOURCE_MEM, 0); - pc->mmio_base = devm_ioremap_resource(&pdev->dev, r); + pc->mmio_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(pc->mmio_base)) return PTR_ERR(pc->mmio_base); |