[v1,2/4] pinctrl: cherryview: Use devm_platform_ioremap_resource()
diff mbox series

Message ID 20190703145615.74768-2-andriy.shevchenko@linux.intel.com
State New
Headers show
Series
  • [v1,1/4] pinctrl: baytrail: Use devm_platform_ioremap_resource()
Related show

Commit Message

Andy Shevchenko July 3, 2019, 2:56 p.m. UTC
Use the new helper that wraps the calls to platform_get_resource()
and devm_ioremap_resource() together.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/pinctrl/intel/pinctrl-cherryview.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Patch
diff mbox series

diff --git a/drivers/pinctrl/intel/pinctrl-cherryview.c b/drivers/pinctrl/intel/pinctrl-cherryview.c
index d0740714b3cb..6e7da421b6c9 100644
--- a/drivers/pinctrl/intel/pinctrl-cherryview.c
+++ b/drivers/pinctrl/intel/pinctrl-cherryview.c
@@ -1689,7 +1689,6 @@  static int chv_pinctrl_probe(struct platform_device *pdev)
 {
 	struct chv_pinctrl *pctrl;
 	struct acpi_device *adev;
-	struct resource *res;
 	acpi_status status;
 	int ret, irq, i;
 
@@ -1717,8 +1716,7 @@  static int chv_pinctrl_probe(struct platform_device *pdev)
 	if (!pctrl->saved_pin_context)
 		return -ENOMEM;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	pctrl->regs = devm_ioremap_resource(&pdev->dev, res);
+	pctrl->regs = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(pctrl->regs))
 		return PTR_ERR(pctrl->regs);