aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYangtao Li <tiny.windzz@gmail.com>2019-12-29 08:05:47 +0000
committerThierry Reding <thierry.reding@gmail.com>2020-11-11 19:00:07 +0100
commit3dfa2e947322fa7f6c1f2ef58f4c1187340d6375 (patch)
treeb1168bac08ebad5b25cc135bec6825567c328adb
parent8e29a0447a18bd90869248f3988d357719081837 (diff)
downloadlinux-next-3dfa2e947322fa7f6c1f2ef58f4c1187340d6375.tar.gz
pwm: pxa: Convert to devm_platform_ioremap_resource()
Notice: this object is not reachable from any branch.
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>
Notice: this object is not reachable from any branch.
-rw-r--r--drivers/pwm/pwm-pxa.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/pwm/pwm-pxa.c b/drivers/pwm/pwm-pxa.c
index a2a0912c2dcd8..d06cf60e6575c 100644
--- a/drivers/pwm/pwm-pxa.c
+++ b/drivers/pwm/pwm-pxa.c
@@ -166,7 +166,6 @@ static int pwm_probe(struct platform_device *pdev)
{
const struct platform_device_id *id = platform_get_device_id(pdev);
struct pxa_pwm_chip *pwm;
- struct resource *r;
int ret = 0;
if (IS_ENABLED(CONFIG_OF) && id == NULL)
@@ -193,8 +192,7 @@ static int pwm_probe(struct platform_device *pdev)
pwm->chip.of_pwm_n_cells = 1;
}
- r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- pwm->mmio_base = devm_ioremap_resource(&pdev->dev, r);
+ pwm->mmio_base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(pwm->mmio_base))
return PTR_ERR(pwm->mmio_base);