--- initial
+++ final
@@ -1,84 +1,84 @@
 static int mtk_nfc_nand_chip_init(struct device *dev, struct mtk_nfc *nfc, struct device_node *np) {
   struct mtk_nfc_nand_chip *chip;
   struct nand_chip *nand;
   struct mtd_info *mtd;
   int nsels, len;
   u32 tmp;
   int ret;
   int i;
   if (!of_get_property(np, "reg", &nsels)) return -ENODEV;
   nsels /= sizeof(u32);
   if (!nsels || nsels > MTK_NAND_MAX_NSELS) {
     dev_err(dev, "invalid reg property size %d\n", nsels);
     return -EINVAL;
   }
   chip = devm_kzalloc(dev, sizeof(*chip) + nsels * sizeof(u8), GFP_KERNEL);
   if (!chip) return -ENOMEM;
   chip->nsels = nsels;
   for (i = 0; i < nsels; i++) {
     ret = of_property_read_u32_index(np, "reg", i, &tmp);
     if (ret) {
       dev_err(dev, "reg property failure : %d\n", ret);
       return ret;
     }
     chip->sels[i] = tmp;
   }
   nand = &chip->nand;
   nand->controller = &nfc->controller;
   nand_set_flash_node(nand, np);
   nand_set_controller_data(nand, nfc);
   nand->options |= NAND_USE_BOUNCE_BUFFER | NAND_SUBPAGE_READ;
   nand->dev_ready = mtk_nfc_dev_ready;
   nand->select_chip = mtk_nfc_select_chip;
   nand->write_byte = mtk_nfc_write_byte;
   nand->write_buf = mtk_nfc_write_buf;
   nand->read_byte = mtk_nfc_read_byte;
   nand->read_buf = mtk_nfc_read_buf;
   nand->cmd_ctrl = mtk_nfc_cmd_ctrl;
   nand->setup_data_interface = mtk_nfc_setup_data_interface;
   /* set default mode in case dt entry is missing */
   nand->ecc.mode = NAND_ECC_HW;
   nand->ecc.write_subpage = mtk_nfc_write_subpage_hwecc;
   nand->ecc.write_page_raw = mtk_nfc_write_page_raw;
   nand->ecc.write_page = mtk_nfc_write_page_hwecc;
   nand->ecc.write_oob_raw = mtk_nfc_write_oob_std;
   nand->ecc.write_oob = mtk_nfc_write_oob_std;
   nand->ecc.read_subpage = mtk_nfc_read_subpage_hwecc;
   nand->ecc.read_page_raw = mtk_nfc_read_page_raw;
   nand->ecc.read_page = mtk_nfc_read_page_hwecc;
   nand->ecc.read_oob_raw = mtk_nfc_read_oob_std;
   nand->ecc.read_oob = mtk_nfc_read_oob_std;
   mtd = nand_to_mtd(nand);
   mtd->owner = THIS_MODULE;
   mtd->dev.parent = dev;
   mtd->name = MTK_NAME;
   mtd_set_ooblayout(mtd, &mtk_nfc_ooblayout_ops);
   mtk_nfc_hw_init(nfc);
   ret = nand_scan_ident(mtd, nsels, NULL);
   if (ret) return ret;
   /* store bbt magic in page, cause OOB is not protected */
   if (nand->bbt_options & NAND_BBT_USE_FLASH) nand->bbt_options |= NAND_BBT_NO_OOB;
   ret = mtk_nfc_ecc_init(dev, mtd);
   if (ret) return -EINVAL;
   if (nand->options & NAND_BUSWIDTH_16) {
     dev_err(dev, "16bits buswidth not supported");
     return -EINVAL;
   }
   ret = mtk_nfc_set_spare_per_sector(&chip->spare_per_sector, mtd);
   if (ret) return ret;
   mtk_nfc_set_fdm(&chip->fdm, mtd);
   mtk_nfc_set_bad_mark_ctl(&chip->bad_mark, mtd);
   len = mtd->writesize + mtd->oobsize;
   nfc->buffer = devm_kzalloc(dev, len, GFP_KERNEL);
   if (!nfc->buffer) return -ENOMEM;
   ret = nand_scan_tail(mtd);
   if (ret) return ret;
-  ret = mtd_device_parse_register(mtd, NULL, NULL, NULL, 0);
+  ret = mtd_device_register(mtd, NULL, 0);
   if (ret) {
     dev_err(dev, "mtd parse partition error\n");
     nand_release(mtd);
     return ret;
   }
   list_add_tail(&chip->node, &nfc->chips);
   return 0;
 }<sep>@@
expression e1,e2,e3;
@@
-       mtd_device_parse_register
+       mtd_device_register
         (e1,
-                                      NULL, NULL,
                                       e2,e3)