imamnurby/smpl_train_seed8 huggingface dataset:
--- initial
+++ final
@@ -1,5 +1,5 @@
 static int vr_nor_init_partitions(struct vr_nor_mtd *p) {
   /* register the flash bank */
   /* partition the flash bank */
-  return mtd_device_parse_register(p->info, NULL, NULL, NULL, 0);
+  return mtd_device_register(p->info, NULL, 0);
 }<sep>@@
expression e1,e2,e3;
@@
-       mtd_device_parse_register
+       mtd_device_register
         (e1,
-                                      NULL, NULL,
                                       e2,e3)
--- initial
+++ final
@@ -1,67 +1,67 @@
 static int latch_addr_flash_probe(struct platform_device *dev) {
   struct latch_addr_flash_data *latch_addr_data;
   struct latch_addr_flash_info *info;
   resource_size_t win_base = dev->resource->start;
   resource_size_t win_size = resource_size(dev->resource);
   char **probe_type;
   int chipsel;
   int err;
   latch_addr_data = dev_get_platdata(&dev->dev);
   if (latch_addr_data == NULL) return -ENODEV;
   pr_notice("latch-addr platform flash device: %#llx byte "
             "window at %#.8llx\n",
             (unsigned long long)win_size, (unsigned long long)win_base);
   chipsel = dev->id;
   if (latch_addr_data->init) {
     err = latch_addr_data->init(latch_addr_data->data, chipsel);
     if (err != 0) return err;
   }
   info = kzalloc(sizeof(struct latch_addr_flash_info), GFP_KERNEL);
   if (info == NULL) {
     err = -ENOMEM;
     goto done;
   }
   platform_set_drvdata(dev, info);
   info->res = request_mem_region(win_base, win_size, DRIVER_NAME);
   if (info->res == NULL) {
     dev_err(&dev->dev, "Could not reserve memory region\n");
     err = -EBUSY;
     goto free_info;
   }
   info->map.name = DRIVER_NAME;
   info->map.size = latch_addr_data->size;
   info->map.bankwidth = latch_addr_data->width;
   info->map.phys = NO_XIP;
   info->map.virt = ioremap(win_base, win_size);
   if (!info->map.virt) {
     err = -ENOMEM;
     goto free_res;
   }
   info->map.map_priv_1 = (unsigned long)info;
   info->map.read = lf_read;
   info->map.copy_from = lf_copy_from;
   info->map.write = lf_write;
   info->set_window = latch_addr_data->set_window;
   info->data = latch_addr_data->data;
   info->win_mask = win_size - 1;
   spin_lock_init(&info->lock);
   for (probe_type = rom_probe_types; !info->mtd && *probe_type; probe_type++)
     info->mtd = do_map_probe(*probe_type, &info->map);
   if (info->mtd == NULL) {
     dev_err(&dev->dev, "map_probe failed\n");
     err = -ENODEV;
     goto iounmap;
   }
   info->mtd->dev.parent = &dev->dev;
-  mtd_device_parse_register(info->mtd, NULL, NULL, latch_addr_data->parts, latch_addr_data->nr_parts);
+  mtd_device_register(info->mtd, latch_addr_data->parts, latch_addr_data->nr_parts);
   return 0;
 iounmap:
   iounmap(info->map.virt);
 free_res:
   release_mem_region(info->res->start, resource_size(info->res));
 free_info:
   kfree(info);
 done:
   if (latch_addr_data->done) latch_addr_data->done(latch_addr_data->data);
   return err;
 }<sep>@@
expression e1,e2,e3;
@@
-       mtd_device_parse_register
+       mtd_device_register
         (e1,
-                                      NULL, NULL,
                                       e2,e3)
--- initial
+++ final
@@ -1,43 +1,43 @@
 static int rbtx4939_flash_probe(struct platform_device *dev) {
   struct rbtx4939_flash_data *pdata;
   struct rbtx4939_flash_info *info;
   struct resource *res;
   const char *const *probe_type;
   int err = 0;
   unsigned long size;
   pdata = dev_get_platdata(&dev->dev);
   if (!pdata) return -ENODEV;
   res = platform_get_resource(dev, IORESOURCE_MEM, 0);
   if (!res) return -ENODEV;
   info = devm_kzalloc(&dev->dev, sizeof(struct rbtx4939_flash_info), GFP_KERNEL);
   if (!info) return -ENOMEM;
   platform_set_drvdata(dev, info);
   size = resource_size(res);
   pr_notice("rbtx4939 platform flash device: %pR\n", res);
   if (!devm_request_mem_region(&dev->dev, res->start, size, dev_name(&dev->dev))) return -EBUSY;
   info->map.name = dev_name(&dev->dev);
   info->map.phys = res->start;
   info->map.size = size;
   info->map.bankwidth = pdata->width;
   info->map.virt = devm_ioremap(&dev->dev, info->map.phys, size);
   if (!info->map.virt) return -EBUSY;
   if (pdata->map_init)
     (*pdata->map_init)(&info->map);
   else
     simple_map_init(&info->map);
   probe_type = rom_probe_types;
   for (; !info->mtd && *probe_type; probe_type++)
     info->mtd = do_map_probe(*probe_type, &info->map);
   if (!info->mtd) {
     dev_err(&dev->dev, "map_probe failed\n");
     err = -ENXIO;
     goto err_out;
   }
   info->mtd->dev.parent = &dev->dev;
-  err = mtd_device_parse_register(info->mtd, NULL, NULL, pdata->parts, pdata->nr_parts);
+  err = mtd_device_register(info->mtd, pdata->parts, pdata->nr_parts);
   if (err) goto err_out;
   return 0;
 err_out:
   rbtx4939_flash_remove(dev);
   return err;
 }<sep>@@
expression e1,e2,e3;
@@
-       mtd_device_parse_register
+       mtd_device_register
         (e1,
-                                      NULL, NULL,
                                       e2,e3)
--- initial
+++ final
@@ -1,32 +1,32 @@
 static int sst25l_probe(struct spi_device *spi) {
   struct flash_info *flash_info;
   struct sst25l_flash *flash;
   struct flash_platform_data *data;
   int ret;
   flash_info = sst25l_match_device(spi);
   if (!flash_info) return -ENODEV;
   flash = devm_kzalloc(&spi->dev, sizeof(*flash), GFP_KERNEL);
   if (!flash) return -ENOMEM;
   flash->spi = spi;
   mutex_init(&flash->lock);
   spi_set_drvdata(spi, flash);
   data = dev_get_platdata(&spi->dev);
   if (data && data->name) flash->mtd.name = data->name;
   flash->mtd.dev.parent = &spi->dev;
   flash->mtd.type = MTD_NORFLASH;
   flash->mtd.flags = MTD_CAP_NORFLASH;
   flash->mtd.erasesize = flash_info->erase_size;
   flash->mtd.writesize = flash_info->page_size;
   flash->mtd.writebufsize = flash_info->page_size;
   flash->mtd.size = flash_info->page_size * flash_info->nr_pages;
   flash->mtd._erase = sst25l_erase;
   flash->mtd._read = sst25l_read;
   flash->mtd._write = sst25l_write;
   dev_info(&spi->dev, "%s (%lld KiB)\n", flash_info->name, (long long)flash->mtd.size >> 10);
   pr_debug("mtd .name = %s, .size = 0x%llx (%lldMiB) "
            ".erasesize = 0x%.8x (%uKiB) .numeraseregions = %d\n",
            flash->mtd.name, (long long)flash->mtd.size, (long long)(flash->mtd.size >> 20), flash->mtd.erasesize, flash->mtd.erasesize / 1024, flash->mtd.numeraseregions);
-  ret = mtd_device_parse_register(&flash->mtd, NULL, NULL, data ? data->parts : NULL, data ? data->nr_parts : 0);
+  ret = mtd_device_register(&flash->mtd, data ? data->parts : NULL, data ? data->nr_parts : 0);
   if (ret) return -ENODEV;
   return 0;
 }<sep>@@
expression e1,e2,e3;
@@
-       mtd_device_parse_register
+       mtd_device_register
         (e1,
-                                      NULL, NULL,
                                       e2,e3)
--- initial
+++ final
@@ -1,36 +1,36 @@
 struct intel_spi *intel_spi_probe(struct device *dev, struct resource *mem, const struct intel_spi_boardinfo *info) {
   const struct spi_nor_hwcaps hwcaps = {
       .mask = SNOR_HWCAPS_READ | SNOR_HWCAPS_READ_FAST | SNOR_HWCAPS_PP,
   };
   struct mtd_partition part;
   struct intel_spi *ispi;
   int ret;
   if (!info || !mem) return ERR_PTR(-EINVAL);
   ispi = devm_kzalloc(dev, sizeof(*ispi), GFP_KERNEL);
   if (!ispi) return ERR_PTR(-ENOMEM);
   ispi->base = devm_ioremap_resource(dev, mem);
   if (IS_ERR(ispi->base)) return ERR_CAST(ispi->base);
   ispi->dev = dev;
   ispi->info = info;
   ispi->writeable = info->writeable;
   ret = intel_spi_init(ispi);
   if (ret) return ERR_PTR(ret);
   ispi->nor.dev = ispi->dev;
   ispi->nor.priv = ispi;
   ispi->nor.read_reg = intel_spi_read_reg;
   ispi->nor.write_reg = intel_spi_write_reg;
   ispi->nor.read = intel_spi_read;
   ispi->nor.write = intel_spi_write;
   ispi->nor.erase = intel_spi_erase;
   ret = spi_nor_scan(&ispi->nor, NULL, &hwcaps);
   if (ret) {
     dev_info(dev, "failed to locate the chip\n");
     return ERR_PTR(ret);
   }
   intel_spi_fill_partition(ispi, &part);
   /* Prevent writes if not explicitly enabled */
   if (!ispi->writeable || !writeable) ispi->nor.mtd.flags &= ~MTD_WRITEABLE;
-  ret = mtd_device_parse_register(&ispi->nor.mtd, NULL, NULL, &part, 1);
+  ret = mtd_device_register(&ispi->nor.mtd, &part, 1);
   if (ret) return ERR_PTR(ret);
   return ispi;
 }<sep>@@
expression e1,e2,e3;
@@
-       mtd_device_parse_register
+       mtd_device_register
         (e1,
-                                      NULL, NULL,
                                       e2,e3)
--- initial
+++ final
@@ -1,38 +1,38 @@
 static int brcm_ahci_probe(struct platform_device *pdev) {
   const struct of_device_id *of_id;
   struct device *dev = &pdev->dev;
   struct brcm_ahci_priv *priv;
   struct ahci_host_priv *hpriv;
   struct resource *res;
   int ret;
   priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
   if (!priv) return -ENOMEM;
   of_id = of_match_node(ahci_of_match, pdev->dev.of_node);
   if (!of_id) return -ENODEV;
   priv->version = (enum brcm_ahci_version)of_id->data;
   priv->dev = dev;
   res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "top-ctrl");
   priv->top_ctrl = devm_ioremap_resource(dev, res);
   if (IS_ERR(priv->top_ctrl)) return PTR_ERR(priv->top_ctrl);
   if ((priv->version == BRCM_SATA_BCM7425) || (priv->version == BRCM_SATA_NSP)) {
     priv->quirks |= BRCM_AHCI_QUIRK_NO_NCQ;
     priv->quirks |= BRCM_AHCI_QUIRK_SKIP_PHY_ENABLE;
   }
   brcm_sata_init(priv);
   priv->port_mask = brcm_ahci_get_portmask(pdev, priv);
   if (!priv->port_mask) return -ENODEV;
   brcm_sata_phys_enable(priv);
-  hpriv = ahci_platform_get_resources(pdev);
+  hpriv = ahci_platform_get_resources(pdev, 0);
   if (IS_ERR(hpriv)) return PTR_ERR(hpriv);
   hpriv->plat_data = priv;
   hpriv->flags = AHCI_HFLAG_WAKE_BEFORE_STOP;
   brcm_sata_alpm_init(hpriv);
   ret = ahci_platform_enable_resources(hpriv);
   if (ret) return ret;
   if (priv->quirks & BRCM_AHCI_QUIRK_NO_NCQ) hpriv->flags |= AHCI_HFLAG_NO_NCQ;
   hpriv->flags |= AHCI_HFLAG_NO_WRITE_TO_RO;
   ret = ahci_platform_init_host(pdev, hpriv, &ahci_brcm_port_info, &ahci_platform_sht);
   if (ret) return ret;
   dev_info(dev, "Broadcom AHCI SATA3 registered\n");
   return 0;
 }<sep>@@
expression pdev;
@@
ahci_platform_get_resources(pdev
+  , 0
   )
--- initial
+++ final
@@ -1,67 +1,67 @@
 static int ceva_ahci_probe(struct platform_device *pdev) {
   struct device_node *np = pdev->dev.of_node;
   struct device *dev = &pdev->dev;
   struct ahci_host_priv *hpriv;
   struct ceva_ahci_priv *cevapriv;
   enum dev_dma_attr attr;
   int rc;
   cevapriv = devm_kzalloc(dev, sizeof(*cevapriv), GFP_KERNEL);
   if (!cevapriv) return -ENOMEM;
   cevapriv->ahci_pdev = pdev;
-  hpriv = ahci_platform_get_resources(pdev);
+  hpriv = ahci_platform_get_resources(pdev, 0);
   if (IS_ERR(hpriv)) return PTR_ERR(hpriv);
   rc = ahci_platform_enable_resources(hpriv);
   if (rc) return rc;
   if (of_property_read_bool(np, "ceva,broken-gen2")) cevapriv->flags = CEVA_FLAG_BROKEN_GEN2;
   /* Read OOB timing value for COMINIT from device-tree */
   if (of_property_read_u8_array(np, "ceva,p0-cominit-params", (u8 *)&cevapriv->pp2c[0], 4) < 0) {
     dev_warn(dev, "ceva,p0-cominit-params property not defined\n");
     return -EINVAL;
   }
   if (of_property_read_u8_array(np, "ceva,p1-cominit-params", (u8 *)&cevapriv->pp2c[1], 4) < 0) {
     dev_warn(dev, "ceva,p1-cominit-params property not defined\n");
     return -EINVAL;
   }
   /* Read OOB timing value for COMWAKE from device-tree*/
   if (of_property_read_u8_array(np, "ceva,p0-comwake-params", (u8 *)&cevapriv->pp3c[0], 4) < 0) {
     dev_warn(dev, "ceva,p0-comwake-params property not defined\n");
     return -EINVAL;
   }
   if (of_property_read_u8_array(np, "ceva,p1-comwake-params", (u8 *)&cevapriv->pp3c[1], 4) < 0) {
     dev_warn(dev, "ceva,p1-comwake-params property not defined\n");
     return -EINVAL;
   }
   /* Read phy BURST timing value from device-tree */
   if (of_property_read_u8_array(np, "ceva,p0-burst-params", (u8 *)&cevapriv->pp4c[0], 4) < 0) {
     dev_warn(dev, "ceva,p0-burst-params property not defined\n");
     return -EINVAL;
   }
   if (of_property_read_u8_array(np, "ceva,p1-burst-params", (u8 *)&cevapriv->pp4c[1], 4) < 0) {
     dev_warn(dev, "ceva,p1-burst-params property not defined\n");
     return -EINVAL;
   }
   /* Read phy RETRY interval timing value from device-tree */
   if (of_property_read_u16_array(np, "ceva,p0-retry-params", (u16 *)&cevapriv->pp5c[0], 2) < 0) {
     dev_warn(dev, "ceva,p0-retry-params property not defined\n");
     return -EINVAL;
   }
   if (of_property_read_u16_array(np, "ceva,p1-retry-params", (u16 *)&cevapriv->pp5c[1], 2) < 0) {
     dev_warn(dev, "ceva,p1-retry-params property not defined\n");
     return -EINVAL;
   }
   /*
    * Check if CCI is enabled for SATA. The DEV_DMA_COHERENT is returned
    * if CCI is enabled, so check for DEV_DMA_COHERENT.
    */
   attr = device_get_dma_attr(dev);
   cevapriv->is_cci_enabled = (attr == DEV_DMA_COHERENT);
   hpriv->plat_data = cevapriv;
   /* CEVA specific initialization */
   ahci_ceva_setup(hpriv);
   rc = ahci_platform_init_host(pdev, hpriv, &ahci_ceva_port_info, &ahci_platform_sht);
   if (rc) goto disable_resources;
   return 0;
 disable_resources:
   ahci_platform_disable_resources(hpriv);
   return rc;
 }<sep>@@
expression pdev;
@@
ahci_platform_get_resources(pdev
+  , 0
   )
--- initial
+++ final
@@ -1,60 +1,60 @@
 static int ahci_da850_probe(struct platform_device *pdev) {
   struct device *dev = &pdev->dev;
   struct ahci_host_priv *hpriv;
   void __iomem *pwrdn_reg;
   struct resource *res;
   struct clk *clk;
   u32 mpy;
   int rc;
-  hpriv = ahci_platform_get_resources(pdev);
+  hpriv = ahci_platform_get_resources(pdev, 0);
   if (IS_ERR(hpriv)) return PTR_ERR(hpriv);
   /*
    * Internally ahci_platform_get_resources() calls clk_get(dev, NULL)
    * when trying to obtain the functional clock. This SATA controller
    * uses two clocks for which we specify two connection ids. If we don't
    * have the functional clock at this point - call clk_get() again with
    * con_id = "fck".
    */
   if (!hpriv->clks[0]) {
     clk = clk_get(dev, "fck");
     if (IS_ERR(clk)) return PTR_ERR(clk);
     hpriv->clks[0] = clk;
   }
   /*
    * The second clock used by ahci-da850 is the external REFCLK. If we
    * didn't get it from ahci_platform_get_resources(), let's try to
    * specify the con_id in clk_get().
    */
   if (!hpriv->clks[1]) {
     clk = clk_get(dev, "refclk");
     if (IS_ERR(clk)) {
       dev_err(dev, "unable to obtain the reference clock");
       return -ENODEV;
     }
     hpriv->clks[1] = clk;
   }
   mpy = ahci_da850_calculate_mpy(clk_get_rate(hpriv->clks[1]));
   if (mpy == 0) {
     dev_err(dev, "invalid REFCLK multiplier value: 0x%x", mpy);
     return -EINVAL;
   }
   rc = ahci_platform_enable_resources(hpriv);
   if (rc) return rc;
   res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
   if (!res) {
     rc = -ENODEV;
     goto disable_resources;
   }
   pwrdn_reg = devm_ioremap(dev, res->start, resource_size(res));
   if (!pwrdn_reg) {
     rc = -ENOMEM;
     goto disable_resources;
   }
   da850_sata_init(dev, pwrdn_reg, hpriv->mmio, mpy);
   rc = ahci_platform_init_host(pdev, hpriv, &ahci_da850_port_info, &ahci_platform_sht);
   if (rc) goto disable_resources;
   return 0;
 disable_resources:
   ahci_platform_disable_resources(hpriv);
   return rc;
 }<sep>@@
expression pdev;
@@
ahci_platform_get_resources(pdev
+  , 0
   )
--- initial
+++ final
@@ -1,17 +1,17 @@
 static int ahci_dm816_probe(struct platform_device *pdev) {
   struct device *dev = &pdev->dev;
   struct ahci_host_priv *hpriv;
   int rc;
-  hpriv = ahci_platform_get_resources(pdev);
+  hpriv = ahci_platform_get_resources(pdev, 0);
   if (IS_ERR(hpriv)) return PTR_ERR(hpriv);
   rc = ahci_platform_enable_resources(hpriv);
   if (rc) return rc;
   rc = ahci_dm816_phy_init(hpriv, dev);
   if (rc) goto disable_resources;
   rc = ahci_platform_init_host(pdev, hpriv, &ahci_dm816_port_info, &ahci_dm816_platform_sht);
   if (rc) goto disable_resources;
   return 0;
 disable_resources:
   ahci_platform_disable_resources(hpriv);
   return rc;
 }<sep>@@
expression pdev;
@@
ahci_platform_get_resources(pdev
+  , 0
   )
--- initial
+++ final
@@ -1,23 +1,23 @@
 static int mtk_ahci_probe(struct platform_device *pdev) {
   struct device *dev = &pdev->dev;
   struct mtk_ahci_plat *plat;
   struct ahci_host_priv *hpriv;
   int err;
   plat = devm_kzalloc(dev, sizeof(*plat), GFP_KERNEL);
   if (!plat) return -ENOMEM;
-  hpriv = ahci_platform_get_resources(pdev);
+  hpriv = ahci_platform_get_resources(pdev, 0);
   if (IS_ERR(hpriv)) return PTR_ERR(hpriv);
   hpriv->plat_data = plat;
   err = mtk_ahci_parse_property(hpriv, dev);
   if (err) return err;
   err = mtk_ahci_platform_resets(hpriv, dev);
   if (err) return err;
   err = ahci_platform_enable_resources(hpriv);
   if (err) return err;
   err = ahci_platform_init_host(pdev, hpriv, &ahci_port_info, &ahci_platform_sht);
   if (err) goto disable_resources;
   return 0;
 disable_resources:
   ahci_platform_disable_resources(hpriv);
   return err;
 }<sep>@@
expression pdev;
@@
ahci_platform_get_resources(pdev
+  , 0
   )
--- initial
+++ final
@@ -1,22 +1,22 @@
 static int ahci_mvebu_probe(struct platform_device *pdev) {
   struct ahci_host_priv *hpriv;
   const struct mbus_dram_target_info *dram;
   int rc;
-  hpriv = ahci_platform_get_resources(pdev);
+  hpriv = ahci_platform_get_resources(pdev, 0);
   if (IS_ERR(hpriv)) return PTR_ERR(hpriv);
   rc = ahci_platform_enable_resources(hpriv);
   if (rc) return rc;
   hpriv->stop_engine = ahci_mvebu_stop_engine;
   if (of_device_is_compatible(pdev->dev.of_node, "marvell,armada-380-ahci")) {
     dram = mv_mbus_dram_info();
     if (!dram) return -ENODEV;
     ahci_mvebu_mbus_config(hpriv, dram);
     ahci_mvebu_regret_option(hpriv);
   }
   rc = ahci_platform_init_host(pdev, hpriv, &ahci_mvebu_port_info, &ahci_platform_sht);
   if (rc) goto disable_resources;
   return 0;
 disable_resources:
   ahci_platform_disable_resources(hpriv);
   return rc;
 }<sep>@@
expression pdev;
@@
ahci_platform_get_resources(pdev
+  , 0
   )
--- initial
+++ final
@@ -1,17 +1,17 @@
 static int ahci_probe(struct platform_device *pdev) {
   struct device *dev = &pdev->dev;
   struct ahci_host_priv *hpriv;
   int rc;
-  hpriv = ahci_platform_get_resources(pdev);
+  hpriv = ahci_platform_get_resources(pdev, 0);
   if (IS_ERR(hpriv)) return PTR_ERR(hpriv);
   rc = ahci_platform_enable_resources(hpriv);
   if (rc) return rc;
   of_property_read_u32(dev->of_node, "ports-implemented", &hpriv->force_port_map);
   if (of_device_is_compatible(dev->of_node, "hisilicon,hisi-ahci")) hpriv->flags |= AHCI_HFLAG_NO_FBS | AHCI_HFLAG_NO_NCQ;
   rc = ahci_platform_init_host(pdev, hpriv, &ahci_port_info, &ahci_platform_sht);
   if (rc) goto disable_resources;
   return 0;
 disable_resources:
   ahci_platform_disable_resources(hpriv);
   return rc;
 }<sep>@@
expression pdev;
@@
ahci_platform_get_resources(pdev
+  , 0
   )
--- initial
+++ final
@@ -1,33 +1,33 @@
 static int ahci_qoriq_probe(struct platform_device *pdev) {
   struct device_node *np = pdev->dev.of_node;
   struct device *dev = &pdev->dev;
   struct ahci_host_priv *hpriv;
   struct ahci_qoriq_priv *qoriq_priv;
   const struct of_device_id *of_id;
   struct resource *res;
   int rc;
-  hpriv = ahci_platform_get_resources(pdev);
+  hpriv = ahci_platform_get_resources(pdev, 0);
   if (IS_ERR(hpriv)) return PTR_ERR(hpriv);
   of_id = of_match_node(ahci_qoriq_of_match, np);
   if (!of_id) return -ENODEV;
   qoriq_priv = devm_kzalloc(dev, sizeof(*qoriq_priv), GFP_KERNEL);
   if (!qoriq_priv) return -ENOMEM;
   qoriq_priv->type = (enum ahci_qoriq_type)of_id->data;
   res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "sata-ecc");
   if (res) {
     qoriq_priv->ecc_addr = devm_ioremap_resource(dev, res);
     if (IS_ERR(qoriq_priv->ecc_addr)) return PTR_ERR(qoriq_priv->ecc_addr);
   }
   qoriq_priv->is_dmacoherent = of_dma_is_coherent(np);
   rc = ahci_platform_enable_resources(hpriv);
   if (rc) return rc;
   hpriv->plat_data = qoriq_priv;
   rc = ahci_qoriq_phy_init(hpriv);
   if (rc) goto disable_resources;
   rc = ahci_platform_init_host(pdev, hpriv, &ahci_qoriq_port_info, &ahci_qoriq_sht);
   if (rc) goto disable_resources;
   return 0;
 disable_resources:
   ahci_platform_disable_resources(hpriv);
   return rc;
 }<sep>@@
expression pdev;
@@
ahci_platform_get_resources(pdev
+  , 0
   )
--- initial
+++ final
@@ -1,14 +1,14 @@
 static int ahci_seattle_probe(struct platform_device *pdev) {
   int rc;
   struct ahci_host_priv *hpriv;
-  hpriv = ahci_platform_get_resources(pdev);
+  hpriv = ahci_platform_get_resources(pdev, 0);
   if (IS_ERR(hpriv)) return PTR_ERR(hpriv);
   rc = ahci_platform_enable_resources(hpriv);
   if (rc) return rc;
   rc = ahci_platform_init_host(pdev, hpriv, ahci_seattle_get_port_info(pdev, hpriv), &ahci_platform_sht);
   if (rc) goto disable_resources;
   return 0;
 disable_resources:
   ahci_platform_disable_resources(hpriv);
   return rc;
 }<sep>@@
expression pdev;
@@
ahci_platform_get_resources(pdev
+  , 0
   )
--- initial
+++ final
@@ -1,23 +1,23 @@
 static int st_ahci_probe(struct platform_device *pdev) {
   struct device *dev = &pdev->dev;
   struct st_ahci_drv_data *drv_data;
   struct ahci_host_priv *hpriv;
   int err;
   drv_data = devm_kzalloc(&pdev->dev, sizeof(*drv_data), GFP_KERNEL);
   if (!drv_data) return -ENOMEM;
-  hpriv = ahci_platform_get_resources(pdev);
+  hpriv = ahci_platform_get_resources(pdev, 0);
   if (IS_ERR(hpriv)) return PTR_ERR(hpriv);
   hpriv->plat_data = drv_data;
   err = st_ahci_probe_resets(hpriv, &pdev->dev);
   if (err) return err;
   err = ahci_platform_enable_resources(hpriv);
   if (err) return err;
   st_ahci_configure_oob(hpriv->mmio);
   of_property_read_u32(dev->of_node, "ports-implemented", &hpriv->force_port_map);
   err = ahci_platform_init_host(pdev, hpriv, &st_ahci_port_info, &ahci_platform_sht);
   if (err) {
     ahci_platform_disable_resources(hpriv);
     return err;
   }
   return 0;
 }<sep>@@
expression pdev;
@@
ahci_platform_get_resources(pdev
+  , 0
   )
--- initial
+++ final
@@ -1,25 +1,25 @@
 static int ahci_sunxi_probe(struct platform_device *pdev) {
   struct device *dev = &pdev->dev;
   struct ahci_host_priv *hpriv;
   int rc;
-  hpriv = ahci_platform_get_resources(pdev);
+  hpriv = ahci_platform_get_resources(pdev, 0);
   if (IS_ERR(hpriv)) return PTR_ERR(hpriv);
   hpriv->start_engine = ahci_sunxi_start_engine;
   rc = ahci_platform_enable_resources(hpriv);
   if (rc) return rc;
   rc = ahci_sunxi_phy_init(dev, hpriv->mmio);
   if (rc) goto disable_resources;
   hpriv->flags = AHCI_HFLAG_32BIT_ONLY | AHCI_HFLAG_NO_MSI | AHCI_HFLAG_YES_NCQ;
   /*
    * The sunxi sata controller seems to be unable to successfully do a
    * soft reset if no pmp is attached, so disable pmp use unless
    * requested, otherwise directly attached disks do not work.
    */
   if (!enable_pmp) hpriv->flags |= AHCI_HFLAG_NO_PMP;
   rc = ahci_platform_init_host(pdev, hpriv, &ahci_sunxi_port_info, &ahci_platform_sht);
   if (rc) goto disable_resources;
   return 0;
 disable_resources:
   ahci_platform_disable_resources(hpriv);
   return rc;
 }<sep>@@
expression pdev;
@@
ahci_platform_get_resources(pdev
+  , 0
   )