[-next,29/30] pinctrl: at91-pio4: use devm_platform_ioremap_resource() to simplify code
diff mbox series

Message ID 20191017122640.22976-30-yuehaibing@huawei.com
State New
Headers show
Series
  • pinctrl: use devm_platform_ioremap_resource() to simplify code
Related show

Commit Message

Yuehaibing Oct. 17, 2019, 12:26 p.m. UTC
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/pinctrl/pinctrl-at91-pio4.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Patch
diff mbox series

diff --git a/drivers/pinctrl/pinctrl-at91-pio4.c b/drivers/pinctrl/pinctrl-at91-pio4.c
index e380202..6949124 100644
--- a/drivers/pinctrl/pinctrl-at91-pio4.c
+++ b/drivers/pinctrl/pinctrl-at91-pio4.c
@@ -1017,8 +1017,7 @@  static int atmel_pinctrl_probe(struct platform_device *pdev)
 	atmel_pioctrl->nbanks = atmel_pioctrl_data->nbanks;
 	atmel_pioctrl->npins = atmel_pioctrl->nbanks * ATMEL_PIO_NPINS_PER_BANK;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	atmel_pioctrl->reg_base = devm_ioremap_resource(dev, res);
+	atmel_pioctrl->reg_base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(atmel_pioctrl->reg_base))
 		return -EINVAL;