Commit e9534031 authored by Yangtao Li's avatar Yangtao Li Committed by Thierry Reding

pwm: fsl-ftm: Convert to devm_platform_ioremap_resource()

Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: default avatarYangtao Li <tiny.windzz@gmail.com>
Reviewed-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
parent 2e379ffb
...@@ -399,7 +399,6 @@ static const struct regmap_config fsl_pwm_regmap_config = { ...@@ -399,7 +399,6 @@ static const struct regmap_config fsl_pwm_regmap_config = {
static int fsl_pwm_probe(struct platform_device *pdev) static int fsl_pwm_probe(struct platform_device *pdev)
{ {
struct fsl_pwm_chip *fpc; struct fsl_pwm_chip *fpc;
struct resource *res;
void __iomem *base; void __iomem *base;
int ret; int ret;
...@@ -412,8 +411,7 @@ static int fsl_pwm_probe(struct platform_device *pdev) ...@@ -412,8 +411,7 @@ static int fsl_pwm_probe(struct platform_device *pdev)
fpc->soc = of_device_get_match_data(&pdev->dev); fpc->soc = of_device_get_match_data(&pdev->dev);
fpc->chip.dev = &pdev->dev; fpc->chip.dev = &pdev->dev;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); base = devm_platform_ioremap_resource(pdev, 0);
base = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(base)) if (IS_ERR(base))
return PTR_ERR(base); return PTR_ERR(base);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment