summaryrefslogtreecommitdiffstats
path: root/drivers/pwm/pwm-spear.c
diff options
context:
space:
mode:
authorYangtao Li <tiny.windzz@gmail.com>2019-12-29 09:05:49 +0100
committerThierry Reding <thierry.reding@gmail.com>2020-12-17 14:18:41 +0100
commit21af435676d3a4a339420aa122f6a82e0d8ea650 (patch)
tree52abc3d8865a34776c9807837c02db7732649265 /drivers/pwm/pwm-spear.c
parentpwm: zx: Convert to devm_platform_ioremap_resource() (diff)
downloadlinux-21af435676d3a4a339420aa122f6a82e0d8ea650.tar.xz
linux-21af435676d3a4a339420aa122f6a82e0d8ea650.zip
pwm: spear: 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-spear.c')
-rw-r--r--drivers/pwm/pwm-spear.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/pwm/pwm-spear.c b/drivers/pwm/pwm-spear.c
index 6c6b44fd3f43..f63b54aae1b4 100644
--- a/drivers/pwm/pwm-spear.c
+++ b/drivers/pwm/pwm-spear.c
@@ -174,7 +174,6 @@ static int spear_pwm_probe(struct platform_device *pdev)
{
struct device_node *np = pdev->dev.of_node;
struct spear_pwm_chip *pc;
- struct resource *r;
int ret;
u32 val;
@@ -182,8 +181,7 @@ static int spear_pwm_probe(struct platform_device *pdev)
if (!pc)
return -ENOMEM;
- 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);