diff options
author | Yangtao Li <tiny.windzz@gmail.com> | 2019-12-29 08:06:05 +0000 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2020-12-17 14:18:45 +0100 |
commit | 3151b13017ec727b5a20b2ffe65366602d8305b4 (patch) | |
tree | d35567d9a93dd23d97a647d01e111312d546d844 | |
parent | 6e0301e7df7a2bd88bf9397c9814d79594ee42e2 (diff) | |
download | lwn-3151b13017ec727b5a20b2ffe65366602d8305b4.tar.gz lwn-3151b13017ec727b5a20b2ffe65366602d8305b4.zip |
pwm: clps711x: 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>
-rw-r--r-- | drivers/pwm/pwm-clps711x.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/pwm/pwm-clps711x.c b/drivers/pwm/pwm-clps711x.c index ba9500aca078..cb1af86873ee 100644 --- a/drivers/pwm/pwm-clps711x.c +++ b/drivers/pwm/pwm-clps711x.c @@ -113,14 +113,12 @@ static struct pwm_device *clps711x_pwm_xlate(struct pwm_chip *chip, static int clps711x_pwm_probe(struct platform_device *pdev) { struct clps711x_chip *priv; - struct resource *res; priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); if (!priv) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - priv->pmpcon = devm_ioremap_resource(&pdev->dev, res); + priv->pmpcon = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(priv->pmpcon)) return PTR_ERR(priv->pmpcon); |