Commit 625efea8 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven

pinctrl: rza1: Use devm_platform_ioremap_resource() helper

Use the devm_platform_ioremap_resource() helper instead of open-coding
the same operation.
Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
parent 6da53cfa
...@@ -1359,7 +1359,6 @@ static int rza1_pinctrl_register(struct rza1_pinctrl *rza1_pctl) ...@@ -1359,7 +1359,6 @@ static int rza1_pinctrl_register(struct rza1_pinctrl *rza1_pctl)
static int rza1_pinctrl_probe(struct platform_device *pdev) static int rza1_pinctrl_probe(struct platform_device *pdev)
{ {
struct rza1_pinctrl *rza1_pctl; struct rza1_pinctrl *rza1_pctl;
struct resource *res;
int ret; int ret;
rza1_pctl = devm_kzalloc(&pdev->dev, sizeof(*rza1_pctl), GFP_KERNEL); rza1_pctl = devm_kzalloc(&pdev->dev, sizeof(*rza1_pctl), GFP_KERNEL);
...@@ -1368,8 +1367,7 @@ static int rza1_pinctrl_probe(struct platform_device *pdev) ...@@ -1368,8 +1367,7 @@ static int rza1_pinctrl_probe(struct platform_device *pdev)
rza1_pctl->dev = &pdev->dev; rza1_pctl->dev = &pdev->dev;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); rza1_pctl->base = devm_platform_ioremap_resource(pdev, 0);
rza1_pctl->base = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(rza1_pctl->base)) if (IS_ERR(rza1_pctl->base))
return PTR_ERR(rza1_pctl->base); return PTR_ERR(rza1_pctl->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