pinctrl: baytrail: 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:13 +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-baytrail.c

index e5a112a..14a8194 100644 (file)
@@ -1580,12 +1580,10 @@ static int byt_set_soc_data(struct byt_gpio *vg,
 
        for (i = 0; i < soc_data->ncommunities; i++) {
                struct byt_community *comm = vg->communities_copy + i;
-               struct resource *mem_rc;
 
                *comm = vg->soc_data->communities[i];
 
-               mem_rc = platform_get_resource(vg->pdev, IORESOURCE_MEM, 0);
-               comm->reg_base = devm_ioremap_resource(&vg->pdev->dev, mem_rc);
+               comm->reg_base = devm_platform_ioremap_resource(vg->pdev, 0);
                if (IS_ERR(comm->reg_base))
                        return PTR_ERR(comm->reg_base);
        }