diff options
author | Yangtao Li <tiny.windzz@gmail.com> | 2019-12-29 08:05:46 +0000 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2020-12-17 14:18:40 +0100 |
commit | 728cd3e6eaf810d49e5a8d8c288fcabda2c81b63 (patch) | |
tree | a24665576bf1eb46cd6c398bc35414fdc2f68952 /drivers/pwm | |
parent | 7681c2bd2ab2dd1470793694cadcf3487282ffae (diff) | |
download | linux-728cd3e6eaf810d49e5a8d8c288fcabda2c81b63.tar.bz2 |
pwm: sti: 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')
-rw-r--r-- | drivers/pwm/pwm-sti.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/pwm/pwm-sti.c b/drivers/pwm/pwm-sti.c index 1508616d794c..eaeb38c0c0c7 100644 --- a/drivers/pwm/pwm-sti.c +++ b/drivers/pwm/pwm-sti.c @@ -540,7 +540,6 @@ static int sti_pwm_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct sti_pwm_compat_data *cdata; struct sti_pwm_chip *pc; - struct resource *res; unsigned int i; int irq, ret; @@ -552,9 +551,7 @@ static int sti_pwm_probe(struct platform_device *pdev) if (!cdata) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - - pc->mmio = devm_ioremap_resource(dev, res); + pc->mmio = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(pc->mmio)) return PTR_ERR(pc->mmio); |