diff options
author | Yangtao Li <tiny.windzz@gmail.com> | 2019-12-29 11:05:42 +0300 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2020-12-17 16:18:38 +0300 |
commit | e3f22bc2556abd445bc15decd864c85f4444c870 (patch) | |
tree | 24c813e4e7b0d3b8b269b6b1c52b6fc723f5564f /drivers/pwm/pwm-renesas-tpu.c | |
parent | 3d3a32593957da447a27520beefb1834ba068a57 (diff) | |
download | linux-e3f22bc2556abd445bc15decd864c85f4444c870.tar.xz |
pwm: renesas-tpu: 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-renesas-tpu.c')
-rw-r--r-- | drivers/pwm/pwm-renesas-tpu.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/pwm/pwm-renesas-tpu.c b/drivers/pwm/pwm-renesas-tpu.c index 81ad5a551455..d02b24b77cdf 100644 --- a/drivers/pwm/pwm-renesas-tpu.c +++ b/drivers/pwm/pwm-renesas-tpu.c @@ -383,7 +383,6 @@ static const struct pwm_ops tpu_pwm_ops = { static int tpu_probe(struct platform_device *pdev) { struct tpu_device *tpu; - struct resource *res; int ret; tpu = devm_kzalloc(&pdev->dev, sizeof(*tpu), GFP_KERNEL); @@ -394,8 +393,7 @@ static int tpu_probe(struct platform_device *pdev) tpu->pdev = pdev; /* Map memory, get clock and pin control. */ - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - tpu->base = devm_ioremap_resource(&pdev->dev, res); + tpu->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(tpu->base)) return PTR_ERR(tpu->base); |