]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
pinctrl: intel: Use devm_platform_ioremap_resource()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 3 Jul 2019 14:44:20 +0000 (17:44 +0300)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 23 Jul 2019 13:13:14 +0000 (16:13 +0300)
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>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
drivers/pinctrl/intel/pinctrl-intel.c

index a18d6eefe67264e00e0cf1a2e91008bc068861c5..5e460428a42845bef158bb2507b1311600444eb3 100644 (file)
@@ -1313,15 +1313,12 @@ static int intel_pinctrl_probe(struct platform_device *pdev,
 
        for (i = 0; i < pctrl->ncommunities; i++) {
                struct intel_community *community = &pctrl->communities[i];
-               struct resource *res;
                void __iomem *regs;
                u32 padbar;
 
                *community = pctrl->soc->communities[i];
 
-               res = platform_get_resource(pdev, IORESOURCE_MEM,
-                                           community->barno);
-               regs = devm_ioremap_resource(&pdev->dev, res);
+               regs = devm_platform_ioremap_resource(pdev, community->barno);
                if (IS_ERR(regs))
                        return PTR_ERR(regs);