--- initial
+++ final
@@ -1,109 +1,109 @@
 static int mxcnd_probe(struct platform_device *pdev) {
   struct nand_chip *this;
   struct mtd_info *mtd;
   struct mxc_nand_host *host;
   struct resource *res;
   int err = 0;
   /* Allocate memory for MTD device structure and private data */
   host = devm_kzalloc(&pdev->dev, sizeof(struct mxc_nand_host), GFP_KERNEL);
   if (!host) return -ENOMEM;
   /* allocate a temporary buffer for the nand_scan_ident() */
   host->data_buf = devm_kzalloc(&pdev->dev, PAGE_SIZE, GFP_KERNEL);
   if (!host->data_buf) return -ENOMEM;
   host->dev = &pdev->dev;
   /* structures must be linked */
   this = &host->nand;
   mtd = nand_to_mtd(this);
   mtd->dev.parent = &pdev->dev;
   mtd->name = DRIVER_NAME;
   /* 50 us command delay time */
   this->chip_delay = 5;
   nand_set_controller_data(this, host);
   nand_set_flash_node(this, pdev->dev.of_node), this->dev_ready = mxc_nand_dev_ready;
-  this->cmdfunc = mxc_nand_command;
+  this->legacy.cmdfunc = mxc_nand_command;
   this->legacy.read_byte = mxc_nand_read_byte;
   this->legacy.write_buf = mxc_nand_write_buf;
   this->legacy.read_buf = mxc_nand_read_buf;
   this->set_features = mxc_nand_set_features;
   this->get_features = mxc_nand_get_features;
   host->clk = devm_clk_get(&pdev->dev, NULL);
   if (IS_ERR(host->clk)) return PTR_ERR(host->clk);
   err = mxcnd_probe_dt(host);
   if (err > 0) {
     struct mxc_nand_platform_data *pdata = dev_get_platdata(&pdev->dev);
     if (pdata) {
       host->pdata = *pdata;
       host->devtype_data = (struct mxc_nand_devtype_data *)pdev->id_entry->driver_data;
     } else {
       err = -ENODEV;
     }
   }
   if (err < 0) return err;
   this->setup_data_interface = host->devtype_data->setup_data_interface;
   if (host->devtype_data->needs_ip) {
     res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
     host->regs_ip = devm_ioremap_resource(&pdev->dev, res);
     if (IS_ERR(host->regs_ip)) return PTR_ERR(host->regs_ip);
     res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
   } else {
     res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
   }
   host->base = devm_ioremap_resource(&pdev->dev, res);
   if (IS_ERR(host->base)) return PTR_ERR(host->base);
   host->main_area0 = host->base;
   if (host->devtype_data->regs_offset) host->regs = host->base + host->devtype_data->regs_offset;
   host->spare0 = host->base + host->devtype_data->spare0_offset;
   if (host->devtype_data->axi_offset) host->regs_axi = host->base + host->devtype_data->axi_offset;
   this->ecc.bytes = host->devtype_data->eccbytes;
   host->eccsize = host->devtype_data->eccsize;
   this->select_chip = host->devtype_data->select_chip;
   this->ecc.size = 512;
   mtd_set_ooblayout(mtd, host->devtype_data->ooblayout);
   if (host->pdata.hw_ecc) {
     this->ecc.mode = NAND_ECC_HW;
   } else {
     this->ecc.mode = NAND_ECC_SOFT;
     this->ecc.algo = NAND_ECC_HAMMING;
   }
   /* NAND bus width determines access functions used by upper layer */
   if (host->pdata.width == 2) this->options |= NAND_BUSWIDTH_16;
   /* update flash based bbt */
   if (host->pdata.flash_bbt) this->bbt_options |= NAND_BBT_USE_FLASH;
   init_completion(&host->op_completion);
   host->irq = platform_get_irq(pdev, 0);
   if (host->irq < 0) return host->irq;
   /*
    * Use host->devtype_data->irq_control() here instead of irq_control()
    * because we must not disable_irq_nosync without having requested the
    * irq.
    */
   host->devtype_data->irq_control(host, 0);
   err = devm_request_irq(&pdev->dev, host->irq, mxc_nfc_irq, 0, DRIVER_NAME, host);
   if (err) return err;
   err = clk_prepare_enable(host->clk);
   if (err) return err;
   host->clk_act = 1;
   /*
    * Now that we "own" the interrupt make sure the interrupt mask bit is
    * cleared on i.MX21. Otherwise we can't read the interrupt status bit
    * on this machine.
    */
   if (host->devtype_data->irqpending_quirk) {
     disable_irq_nosync(host->irq);
     host->devtype_data->irq_control(host, 1);
   }
   /* Scan the NAND device */
   this->dummy_controller.ops = &mxcnd_controller_ops;
   err = nand_scan(this, is_imx25_nfc(host) ? 4 : 1);
   if (err) goto escan;
   /* Register the partitions */
   err = mtd_device_parse_register(mtd, part_probes, NULL, host->pdata.parts, host->pdata.nr_parts);
   if (err) goto cleanup_nand;
   platform_set_drvdata(pdev, host);
   return 0;
 cleanup_nand:
   nand_cleanup(this);
 escan:
   if (host->clk_act) clk_disable_unprepare(host->clk);
   return err;
 }<sep>@@
expression chip; 
@@
- chip->cmdfunc
+ chip->legacy.cmdfunc