summaryrefslogtreecommitdiffstats
path: root/drivers/pwm
diff options
context:
space:
mode:
authorYangtao Li <tiny.windzz@gmail.com>2019-12-29 08:05:55 +0000
committerThierry Reding <thierry.reding@gmail.com>2020-12-17 14:18:43 +0100
commitcc1cc4ba3673913bc12769fc24ea8ed47819077a (patch)
tree862ae4714f64ff56d766f30d2302b78854d2ab0a /drivers/pwm
parented98401f466507f6fd73da5bbedb5bf7f74b4467 (diff)
downloadlinux-cc1cc4ba3673913bc12769fc24ea8ed47819077a.tar.gz
linux-cc1cc4ba3673913bc12769fc24ea8ed47819077a.tar.bz2
linux-cc1cc4ba3673913bc12769fc24ea8ed47819077a.zip
pwm: samsung: 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')
-rw-r--r--drivers/pwm/pwm-samsung.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/pwm/pwm-samsung.c b/drivers/pwm/pwm-samsung.c
index 87a886f7dc2f..645d0066ff0a 100644
--- a/drivers/pwm/pwm-samsung.c
+++ b/drivers/pwm/pwm-samsung.c
@@ -510,7 +510,6 @@ static int pwm_samsung_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct samsung_pwm_chip *chip;
- struct resource *res;
unsigned int chan;
int ret;
@@ -541,8 +540,7 @@ static int pwm_samsung_probe(struct platform_device *pdev)
sizeof(chip->variant));
}
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- chip->base = devm_ioremap_resource(&pdev->dev, res);
+ chip->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(chip->base))
return PTR_ERR(chip->base);