diff options
author | Yangtao Li <tiny.windzz@gmail.com> | 2019-12-29 11:05:52 +0300 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2020-12-17 16:18:42 +0300 |
commit | 17076b10d40a612a7fe1c41b4bcc1c9701f14cdc (patch) | |
tree | 4ed337c5bba0565382a80a6e5aa96fb6b74b4821 /drivers/pwm/pwm-meson.c | |
parent | fd7c575ac6026e078fa30dc237d3e86897c58652 (diff) | |
download | linux-17076b10d40a612a7fe1c41b4bcc1c9701f14cdc.tar.xz |
pwm: meson: 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: Martin Blumenstingl <martin.blumenstingl@googlemail.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-meson.c')
-rw-r--r-- | drivers/pwm/pwm-meson.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/pwm/pwm-meson.c b/drivers/pwm/pwm-meson.c index bd0d7336b898..a3ce9789412a 100644 --- a/drivers/pwm/pwm-meson.c +++ b/drivers/pwm/pwm-meson.c @@ -537,15 +537,13 @@ static int meson_pwm_init_channels(struct meson_pwm *meson) static int meson_pwm_probe(struct platform_device *pdev) { struct meson_pwm *meson; - struct resource *regs; int err; meson = devm_kzalloc(&pdev->dev, sizeof(*meson), GFP_KERNEL); if (!meson) return -ENOMEM; - regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); - meson->base = devm_ioremap_resource(&pdev->dev, regs); + meson->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(meson->base)) return PTR_ERR(meson->base); |