Explorar o código

mtd: nand: remove useless mtd->priv = chip assignments

mtd_to_nand() now uses the container_of() approach to transform an
mtd_info pointer into a nand_chip one. Drop useless mtd->priv
assignments from NAND controller drivers.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Boris BREZILLON %!s(int64=9) %!d(string=hai) anos
pai
achega
37f5a54646
Modificáronse 42 ficheiros con 0 adicións e 46 borrados
  1. 0 3
      drivers/mtd/nand/ams-delta.c
  2. 0 1
      drivers/mtd/nand/atmel_nand.c
  3. 0 1
      drivers/mtd/nand/au1550nd.c
  4. 0 1
      drivers/mtd/nand/bcm47xxnflash/main.c
  5. 0 1
      drivers/mtd/nand/bf5xx_nand.c
  6. 0 1
      drivers/mtd/nand/brcmnand/brcmnand.c
  7. 0 1
      drivers/mtd/nand/cafe_nand.c
  8. 0 1
      drivers/mtd/nand/cmx270_nand.c
  9. 0 1
      drivers/mtd/nand/cs553x_nand.c
  10. 0 1
      drivers/mtd/nand/davinci_nand.c
  11. 0 1
      drivers/mtd/nand/denali.c
  12. 0 1
      drivers/mtd/nand/diskonchip.c
  13. 0 1
      drivers/mtd/nand/docg4.c
  14. 0 1
      drivers/mtd/nand/fsl_elbc_nand.c
  15. 0 1
      drivers/mtd/nand/fsl_ifc_nand.c
  16. 0 1
      drivers/mtd/nand/fsl_upm.c
  17. 0 1
      drivers/mtd/nand/fsmc_nand.c
  18. 0 1
      drivers/mtd/nand/gpio.c
  19. 0 1
      drivers/mtd/nand/gpmi-nand/gpmi-nand.c
  20. 0 1
      drivers/mtd/nand/hisi504_nand.c
  21. 0 1
      drivers/mtd/nand/jz4740_nand.c
  22. 0 1
      drivers/mtd/nand/lpc32xx_mlc.c
  23. 0 1
      drivers/mtd/nand/lpc32xx_slc.c
  24. 0 1
      drivers/mtd/nand/mpc5121_nfc.c
  25. 0 1
      drivers/mtd/nand/mxc_nand.c
  26. 0 1
      drivers/mtd/nand/nandsim.c
  27. 0 1
      drivers/mtd/nand/ndfc.c
  28. 0 1
      drivers/mtd/nand/nuc900_nand.c
  29. 0 1
      drivers/mtd/nand/omap2.c
  30. 0 1
      drivers/mtd/nand/orion_nand.c
  31. 0 1
      drivers/mtd/nand/pasemi_nand.c
  32. 0 1
      drivers/mtd/nand/plat_nand.c
  33. 0 1
      drivers/mtd/nand/pxa3xx_nand.c
  34. 0 1
      drivers/mtd/nand/r852.c
  35. 0 2
      drivers/mtd/nand/s3c2410.c
  36. 0 1
      drivers/mtd/nand/sh_flctl.c
  37. 0 1
      drivers/mtd/nand/sharpsl.c
  38. 0 1
      drivers/mtd/nand/socrates_nand.c
  39. 0 1
      drivers/mtd/nand/sunxi_nand.c
  40. 0 1
      drivers/mtd/nand/tmio_nand.c
  41. 0 2
      drivers/mtd/nand/txx9ndfmc.c
  42. 0 1
      drivers/mtd/nand/vf610_nfc.c

+ 0 - 3
drivers/mtd/nand/ams-delta.c

@@ -193,9 +193,6 @@ static int ams_delta_init(struct platform_device *pdev)
 	ams_delta_mtd = nand_to_mtd(this);
 	ams_delta_mtd = nand_to_mtd(this);
 	ams_delta_mtd->owner = THIS_MODULE;
 	ams_delta_mtd->owner = THIS_MODULE;
 
 
-	/* Link the private data with the MTD structure */
-	ams_delta_mtd->priv = this;
-
 	/*
 	/*
 	 * Don't try to request the memory region from here,
 	 * Don't try to request the memory region from here,
 	 * it should have been already requested from the
 	 * it should have been already requested from the

+ 0 - 1
drivers/mtd/nand/atmel_nand.c

@@ -2128,7 +2128,6 @@ static int atmel_nand_probe(struct platform_device *pdev)
 	}
 	}
 
 
 	nand_chip->priv = host;		/* link the private data structures */
 	nand_chip->priv = host;		/* link the private data structures */
-	mtd->priv = nand_chip;
 	mtd->dev.parent = &pdev->dev;
 	mtd->dev.parent = &pdev->dev;
 
 
 	/* Set address of NAND IO lines */
 	/* Set address of NAND IO lines */

+ 0 - 1
drivers/mtd/nand/au1550nd.c

@@ -441,7 +441,6 @@ static int au1550nd_probe(struct platform_device *pdev)
 
 
 	this = &ctx->chip;
 	this = &ctx->chip;
 	mtd = nand_to_mtd(this);
 	mtd = nand_to_mtd(this);
-	mtd->priv = this;
 	mtd->dev.parent = &pdev->dev;
 	mtd->dev.parent = &pdev->dev;
 
 
 	/* figure out which CS# r->start belongs to */
 	/* figure out which CS# r->start belongs to */

+ 0 - 1
drivers/mtd/nand/bcm47xxnflash/main.c

@@ -37,7 +37,6 @@ static int bcm47xxnflash_probe(struct platform_device *pdev)
 	b47n->nand_chip.priv = b47n;
 	b47n->nand_chip.priv = b47n;
 	mtd = nand_to_mtd(&b47n->nand_chip);
 	mtd = nand_to_mtd(&b47n->nand_chip);
 	mtd->dev.parent = &pdev->dev;
 	mtd->dev.parent = &pdev->dev;
-	mtd->priv = &b47n->nand_chip; /* Required */
 	b47n->cc = container_of(nflash, struct bcma_drv_cc, nflash);
 	b47n->cc = container_of(nflash, struct bcma_drv_cc, nflash);
 
 
 	if (b47n->cc->core->bus->chipinfo.id == BCMA_CHIP_ID_BCM4706) {
 	if (b47n->cc->core->bus->chipinfo.id == BCMA_CHIP_ID_BCM4706) {

+ 0 - 1
drivers/mtd/nand/bf5xx_nand.c

@@ -782,7 +782,6 @@ static int bf5xx_nand_probe(struct platform_device *pdev)
 	chip->chip_delay   = 0;
 	chip->chip_delay   = 0;
 
 
 	/* initialise mtd info data struct */
 	/* initialise mtd info data struct */
-	mtd->priv	= chip;
 	mtd->dev.parent = &pdev->dev;
 	mtd->dev.parent = &pdev->dev;
 
 
 	/* initialise the hardware */
 	/* initialise the hardware */

+ 0 - 1
drivers/mtd/nand/brcmnand/brcmnand.c

@@ -1924,7 +1924,6 @@ static int brcmnand_init_cs(struct brcmnand_host *host, struct device_node *dn)
 
 
 	nand_set_flash_node(chip, dn);
 	nand_set_flash_node(chip, dn);
 	chip->priv = host;
 	chip->priv = host;
-	mtd->priv = chip;
 	mtd->name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "brcmnand.%d",
 	mtd->name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "brcmnand.%d",
 				   host->cs);
 				   host->cs);
 	mtd->owner = THIS_MODULE;
 	mtd->owner = THIS_MODULE;

+ 0 - 1
drivers/mtd/nand/cafe_nand.c

@@ -611,7 +611,6 @@ static int cafe_nand_probe(struct pci_dev *pdev,
 
 
 	mtd = nand_to_mtd(&cafe->nand);
 	mtd = nand_to_mtd(&cafe->nand);
 	mtd->dev.parent = &pdev->dev;
 	mtd->dev.parent = &pdev->dev;
-	mtd->priv = &cafe->nand;
 	cafe->nand.priv = cafe;
 	cafe->nand.priv = cafe;
 
 
 	cafe->pdev = pdev;
 	cafe->pdev = pdev;

+ 0 - 1
drivers/mtd/nand/cmx270_nand.c

@@ -177,7 +177,6 @@ static int __init cmx270_init(void)
 
 
 	/* Link the private data with the MTD structure */
 	/* Link the private data with the MTD structure */
 	cmx270_nand_mtd->owner = THIS_MODULE;
 	cmx270_nand_mtd->owner = THIS_MODULE;
-	cmx270_nand_mtd->priv = this;
 
 
 	/* insert callbacks */
 	/* insert callbacks */
 	this->IO_ADDR_R = cmx270_nand_io;
 	this->IO_ADDR_R = cmx270_nand_io;

+ 0 - 1
drivers/mtd/nand/cs553x_nand.c

@@ -206,7 +206,6 @@ static int __init cs553x_init_one(int cs, int mmio, unsigned long adr)
 	new_mtd = nand_to_mtd(this);
 	new_mtd = nand_to_mtd(this);
 
 
 	/* Link the private data with the MTD structure */
 	/* Link the private data with the MTD structure */
-	new_mtd->priv = this;
 	new_mtd->owner = THIS_MODULE;
 	new_mtd->owner = THIS_MODULE;
 
 
 	/* map physical address */
 	/* map physical address */

+ 0 - 1
drivers/mtd/nand/davinci_nand.c

@@ -685,7 +685,6 @@ static int nand_davinci_probe(struct platform_device *pdev)
 	info->vaddr		= vaddr;
 	info->vaddr		= vaddr;
 
 
 	mtd			= nand_to_mtd(&info->chip);
 	mtd			= nand_to_mtd(&info->chip);
-	mtd->priv		= &info->chip;
 	mtd->dev.parent		= &pdev->dev;
 	mtd->dev.parent		= &pdev->dev;
 	nand_set_flash_node(&info->chip, pdev->dev.of_node);
 	nand_set_flash_node(&info->chip, pdev->dev.of_node);
 
 

+ 0 - 1
drivers/mtd/nand/denali.c

@@ -1470,7 +1470,6 @@ int denali_init(struct denali_nand_info *denali)
 	/* now that our ISR is registered, we can enable interrupts */
 	/* now that our ISR is registered, we can enable interrupts */
 	denali_set_intr_modes(denali, true);
 	denali_set_intr_modes(denali, true);
 	mtd->name = "denali-nand";
 	mtd->name = "denali-nand";
-	mtd->priv = &denali->nand;
 
 
 	/* register the driver with the NAND core subsystem */
 	/* register the driver with the NAND core subsystem */
 	denali->nand.select_chip = denali_select_chip;
 	denali->nand.select_chip = denali_select_chip;

+ 0 - 1
drivers/mtd/nand/diskonchip.c

@@ -1569,7 +1569,6 @@ static int __init doc_probe(unsigned long physadr)
 	nand->bbt_td		= (struct nand_bbt_descr *) (doc + 1);
 	nand->bbt_td		= (struct nand_bbt_descr *) (doc + 1);
 	nand->bbt_md		= nand->bbt_td + 1;
 	nand->bbt_md		= nand->bbt_td + 1;
 
 
-	mtd->priv		= nand;
 	mtd->owner		= THIS_MODULE;
 	mtd->owner		= THIS_MODULE;
 
 
 	nand->priv		= doc;
 	nand->priv		= doc;

+ 0 - 1
drivers/mtd/nand/docg4.c

@@ -1314,7 +1314,6 @@ static int __init probe_docg4(struct platform_device *pdev)
 
 
 	mtd = nand_to_mtd(nand);
 	mtd = nand_to_mtd(nand);
 	doc = (struct docg4_priv *) (nand + 1);
 	doc = (struct docg4_priv *) (nand + 1);
-	mtd->priv = nand;
 	nand->priv = doc;
 	nand->priv = doc;
 	mtd->dev.parent = &pdev->dev;
 	mtd->dev.parent = &pdev->dev;
 	doc->virtadr = virtadr;
 	doc->virtadr = virtadr;

+ 0 - 1
drivers/mtd/nand/fsl_elbc_nand.c

@@ -746,7 +746,6 @@ static int fsl_elbc_chip_init(struct fsl_elbc_mtd *priv)
 	dev_dbg(priv->dev, "eLBC Set Information for bank %d\n", priv->bank);
 	dev_dbg(priv->dev, "eLBC Set Information for bank %d\n", priv->bank);
 
 
 	/* Fill in fsl_elbc_mtd structure */
 	/* Fill in fsl_elbc_mtd structure */
-	mtd->priv = chip;
 	mtd->dev.parent = priv->dev;
 	mtd->dev.parent = priv->dev;
 	nand_set_flash_node(chip, priv->dev->of_node);
 	nand_set_flash_node(chip, priv->dev->of_node);
 
 

+ 0 - 1
drivers/mtd/nand/fsl_ifc_nand.c

@@ -881,7 +881,6 @@ static int fsl_ifc_chip_init(struct fsl_ifc_mtd *priv)
 	u32 csor;
 	u32 csor;
 
 
 	/* Fill in fsl_ifc_mtd structure */
 	/* Fill in fsl_ifc_mtd structure */
-	mtd->priv = chip;
 	mtd->dev.parent = priv->dev;
 	mtd->dev.parent = priv->dev;
 	nand_set_flash_node(chip, priv->dev->of_node);
 	nand_set_flash_node(chip, priv->dev->of_node);
 
 

+ 0 - 1
drivers/mtd/nand/fsl_upm.c

@@ -176,7 +176,6 @@ static int fun_chip_init(struct fsl_upm_nand *fun,
 	if (fun->rnb_gpio[0] >= 0)
 	if (fun->rnb_gpio[0] >= 0)
 		fun->chip.dev_ready = fun_chip_ready;
 		fun->chip.dev_ready = fun_chip_ready;
 
 
-	mtd->priv = &fun->chip;
 	mtd->dev.parent = fun->dev;
 	mtd->dev.parent = fun->dev;
 
 
 	flash_np = of_get_next_child(upm_np, NULL);
 	flash_np = of_get_next_child(upm_np, NULL);

+ 0 - 1
drivers/mtd/nand/fsmc_nand.c

@@ -1009,7 +1009,6 @@ static int __init fsmc_nand_probe(struct platform_device *pdev)
 	/* Link all private pointers */
 	/* Link all private pointers */
 	mtd = nand_to_mtd(&host->nand);
 	mtd = nand_to_mtd(&host->nand);
 	nand = &host->nand;
 	nand = &host->nand;
-	mtd->priv = nand;
 	nand->priv = host;
 	nand->priv = host;
 	nand_set_flash_node(nand, np);
 	nand_set_flash_node(nand, np);
 
 

+ 0 - 1
drivers/mtd/nand/gpio.c

@@ -278,7 +278,6 @@ static int gpio_nand_probe(struct platform_device *pdev)
 	chip->cmd_ctrl		= gpio_nand_cmd_ctrl;
 	chip->cmd_ctrl		= gpio_nand_cmd_ctrl;
 
 
 	mtd			= nand_to_mtd(chip);
 	mtd			= nand_to_mtd(chip);
-	mtd->priv		= chip;
 	mtd->dev.parent		= &pdev->dev;
 	mtd->dev.parent		= &pdev->dev;
 
 
 	platform_set_drvdata(pdev, gpiomtd);
 	platform_set_drvdata(pdev, gpiomtd);

+ 0 - 1
drivers/mtd/nand/gpmi-nand/gpmi-nand.c

@@ -1893,7 +1893,6 @@ static int gpmi_nand_init(struct gpmi_nand_data *this)
 	this->current_chip	= -1;
 	this->current_chip	= -1;
 
 
 	/* init the MTD data structures */
 	/* init the MTD data structures */
-	mtd->priv		= chip;
 	mtd->name		= "gpmi-nand";
 	mtd->name		= "gpmi-nand";
 	mtd->dev.parent		= this->dev;
 	mtd->dev.parent		= this->dev;
 
 

+ 0 - 1
drivers/mtd/nand/hisi504_nand.c

@@ -735,7 +735,6 @@ static int hisi_nfc_probe(struct platform_device *pdev)
 		goto err_res;
 		goto err_res;
 	}
 	}
 
 
-	mtd->priv		= chip;
 	mtd->name		= "hisi_nand";
 	mtd->name		= "hisi_nand";
 	mtd->dev.parent         = &pdev->dev;
 	mtd->dev.parent         = &pdev->dev;
 
 

+ 0 - 1
drivers/mtd/nand/jz4740_nand.c

@@ -433,7 +433,6 @@ static int jz_nand_probe(struct platform_device *pdev)
 
 
 	chip		= &nand->chip;
 	chip		= &nand->chip;
 	mtd		= nand_to_mtd(chip);
 	mtd		= nand_to_mtd(chip);
-	mtd->priv	= chip;
 	mtd->dev.parent = &pdev->dev;
 	mtd->dev.parent = &pdev->dev;
 	mtd->name	= "jz4740-nand";
 	mtd->name	= "jz4740-nand";
 
 

+ 0 - 1
drivers/mtd/nand/lpc32xx_mlc.c

@@ -681,7 +681,6 @@ static int lpc32xx_nand_probe(struct platform_device *pdev)
 
 
 	nand_chip->priv = host;		/* link the private data structures */
 	nand_chip->priv = host;		/* link the private data structures */
 	nand_set_flash_node(nand_chip, pdev->dev.of_node);
 	nand_set_flash_node(nand_chip, pdev->dev.of_node);
-	mtd->priv = nand_chip;
 	mtd->dev.parent = &pdev->dev;
 	mtd->dev.parent = &pdev->dev;
 
 
 	/* Get NAND clock */
 	/* Get NAND clock */

+ 0 - 1
drivers/mtd/nand/lpc32xx_slc.c

@@ -802,7 +802,6 @@ static int lpc32xx_nand_probe(struct platform_device *pdev)
 	mtd = nand_to_mtd(chip);
 	mtd = nand_to_mtd(chip);
 	chip->priv = host;
 	chip->priv = host;
 	nand_set_flash_node(chip, pdev->dev.of_node);
 	nand_set_flash_node(chip, pdev->dev.of_node);
-	mtd->priv = chip;
 	mtd->owner = THIS_MODULE;
 	mtd->owner = THIS_MODULE;
 	mtd->dev.parent = &pdev->dev;
 	mtd->dev.parent = &pdev->dev;
 
 

+ 0 - 1
drivers/mtd/nand/mpc5121_nfc.c

@@ -656,7 +656,6 @@ static int mpc5121_nfc_probe(struct platform_device *op)
 	chip = &prv->chip;
 	chip = &prv->chip;
 	mtd = nand_to_mtd(chip);
 	mtd = nand_to_mtd(chip);
 
 
-	mtd->priv = chip;
 	mtd->dev.parent = dev;
 	mtd->dev.parent = dev;
 	chip->priv = prv;
 	chip->priv = prv;
 	nand_set_flash_node(chip, dn);
 	nand_set_flash_node(chip, dn);

+ 0 - 1
drivers/mtd/nand/mxc_nand.c

@@ -1514,7 +1514,6 @@ static int mxcnd_probe(struct platform_device *pdev)
 	/* structures must be linked */
 	/* structures must be linked */
 	this = &host->nand;
 	this = &host->nand;
 	mtd = nand_to_mtd(this);
 	mtd = nand_to_mtd(this);
-	mtd->priv = this;
 	mtd->dev.parent = &pdev->dev;
 	mtd->dev.parent = &pdev->dev;
 	mtd->name = DRIVER_NAME;
 	mtd->name = DRIVER_NAME;
 
 

+ 0 - 1
drivers/mtd/nand/nandsim.c

@@ -2243,7 +2243,6 @@ static int __init ns_init_module(void)
 		return -ENOMEM;
 		return -ENOMEM;
 	}
 	}
 	nsmtd       = nand_to_mtd(chip);
 	nsmtd       = nand_to_mtd(chip);
-        nsmtd->priv = (void *)chip;
 	nand        = (struct nandsim *)(chip + 1);
 	nand        = (struct nandsim *)(chip + 1);
 	chip->priv  = (void *)nand;
 	chip->priv  = (void *)nand;
 
 

+ 0 - 1
drivers/mtd/nand/ndfc.c

@@ -167,7 +167,6 @@ static int ndfc_chip_init(struct ndfc_controller *ndfc,
 	chip->ecc.strength = 1;
 	chip->ecc.strength = 1;
 	chip->priv = ndfc;
 	chip->priv = ndfc;
 
 
-	mtd->priv = chip;
 	mtd->dev.parent = &ndfc->ofdev->dev;
 	mtd->dev.parent = &ndfc->ofdev->dev;
 
 
 	flash_np = of_get_next_child(node, NULL);
 	flash_np = of_get_next_child(node, NULL);

+ 0 - 1
drivers/mtd/nand/nuc900_nand.c

@@ -245,7 +245,6 @@ static int nuc900_nand_probe(struct platform_device *pdev)
 	chip = &(nuc900_nand->chip);
 	chip = &(nuc900_nand->chip);
 	mtd = nand_to_mtd(chip);
 	mtd = nand_to_mtd(chip);
 
 
-	mtd->priv		= chip;
 	mtd->dev.parent		= &pdev->dev;
 	mtd->dev.parent		= &pdev->dev;
 	spin_lock_init(&nuc900_nand->lock);
 	spin_lock_init(&nuc900_nand->lock);
 
 

+ 0 - 1
drivers/mtd/nand/omap2.c

@@ -1672,7 +1672,6 @@ static int omap_nand_probe(struct platform_device *pdev)
 	info->ecc_opt		= pdata->ecc_opt;
 	info->ecc_opt		= pdata->ecc_opt;
 	nand_chip		= &info->nand;
 	nand_chip		= &info->nand;
 	mtd			= nand_to_mtd(nand_chip);
 	mtd			= nand_to_mtd(nand_chip);
-	mtd->priv		= &info->nand;
 	mtd->dev.parent		= &pdev->dev;
 	mtd->dev.parent		= &pdev->dev;
 	nand_chip->ecc.priv	= NULL;
 	nand_chip->ecc.priv	= NULL;
 	nand_set_flash_node(nand_chip, pdata->of_node);
 	nand_set_flash_node(nand_chip, pdata->of_node);

+ 0 - 1
drivers/mtd/nand/orion_nand.c

@@ -122,7 +122,6 @@ static int __init orion_nand_probe(struct platform_device *pdev)
 		board = dev_get_platdata(&pdev->dev);
 		board = dev_get_platdata(&pdev->dev);
 	}
 	}
 
 
-	mtd->priv = nc;
 	mtd->dev.parent = &pdev->dev;
 	mtd->dev.parent = &pdev->dev;
 
 
 	nc->priv = board;
 	nc->priv = board;

+ 0 - 1
drivers/mtd/nand/pasemi_nand.c

@@ -121,7 +121,6 @@ static int pasemi_nand_probe(struct platform_device *ofdev)
 	pasemi_nand_mtd = nand_to_mtd(chip);
 	pasemi_nand_mtd = nand_to_mtd(chip);
 
 
 	/* Link the private data with the MTD structure */
 	/* Link the private data with the MTD structure */
-	pasemi_nand_mtd->priv = chip;
 	pasemi_nand_mtd->dev.parent = &ofdev->dev;
 	pasemi_nand_mtd->dev.parent = &ofdev->dev;
 
 
 	chip->IO_ADDR_R = of_iomap(np, 0);
 	chip->IO_ADDR_R = of_iomap(np, 0);

+ 0 - 1
drivers/mtd/nand/plat_nand.c

@@ -59,7 +59,6 @@ static int plat_nand_probe(struct platform_device *pdev)
 	data->chip.priv = &data;
 	data->chip.priv = &data;
 	nand_set_flash_node(&data->chip, pdev->dev.of_node);
 	nand_set_flash_node(&data->chip, pdev->dev.of_node);
 	mtd = nand_to_mtd(&data->chip);
 	mtd = nand_to_mtd(&data->chip);
-	mtd->priv = &data->chip;
 	mtd->dev.parent = &pdev->dev;
 	mtd->dev.parent = &pdev->dev;
 
 
 	data->chip.IO_ADDR_R = data->io_base;
 	data->chip.IO_ADDR_R = data->io_base;

+ 0 - 1
drivers/mtd/nand/pxa3xx_nand.c

@@ -1709,7 +1709,6 @@ static int alloc_nand_resource(struct platform_device *pdev)
 		info->host[cs] = host;
 		info->host[cs] = host;
 		host->cs = cs;
 		host->cs = cs;
 		host->info_data = info;
 		host->info_data = info;
-		mtd->priv = chip;
 		mtd->dev.parent = &pdev->dev;
 		mtd->dev.parent = &pdev->dev;
 		/* FIXME: all chips use the same device tree partitions */
 		/* FIXME: all chips use the same device tree partitions */
 		nand_set_flash_node(chip, np);
 		nand_set_flash_node(chip, np);

+ 0 - 1
drivers/mtd/nand/r852.c

@@ -638,7 +638,6 @@ static int r852_register_nand_device(struct r852_device *dev)
 
 
 	WARN_ON(dev->card_registred);
 	WARN_ON(dev->card_registred);
 
 
-	mtd->priv = dev->chip;
 	mtd->dev.parent = &dev->pci_dev->dev;
 	mtd->dev.parent = &dev->pci_dev->dev;
 
 
 	if (dev->readonly)
 	if (dev->readonly)

+ 0 - 2
drivers/mtd/nand/s3c2410.c

@@ -788,7 +788,6 @@ static void s3c2410_nand_init_chip(struct s3c2410_nand_info *info,
 				   struct s3c2410_nand_set *set)
 				   struct s3c2410_nand_set *set)
 {
 {
 	struct nand_chip *chip = &nmtd->chip;
 	struct nand_chip *chip = &nmtd->chip;
-	struct mtd_info *mtd = nand_to_mtd(chip);
 	void __iomem *regs = info->regs;
 	void __iomem *regs = info->regs;
 
 
 	chip->write_buf    = s3c2410_nand_write_buf;
 	chip->write_buf    = s3c2410_nand_write_buf;
@@ -834,7 +833,6 @@ static void s3c2410_nand_init_chip(struct s3c2410_nand_info *info,
 	chip->IO_ADDR_R = chip->IO_ADDR_W;
 	chip->IO_ADDR_R = chip->IO_ADDR_W;
 
 
 	nmtd->info	   = info;
 	nmtd->info	   = info;
-	mtd->priv	   = chip;
 	nmtd->set	   = set;
 	nmtd->set	   = set;
 
 
 #ifdef CONFIG_MTD_NAND_S3C2410_HWECC
 #ifdef CONFIG_MTD_NAND_S3C2410_HWECC

+ 0 - 1
drivers/mtd/nand/sh_flctl.c

@@ -1123,7 +1123,6 @@ static int flctl_probe(struct platform_device *pdev)
 	nand = &flctl->chip;
 	nand = &flctl->chip;
 	flctl_mtd = nand_to_mtd(nand);
 	flctl_mtd = nand_to_mtd(nand);
 	nand_set_flash_node(nand, pdev->dev.of_node);
 	nand_set_flash_node(nand, pdev->dev.of_node);
-	flctl_mtd->priv = nand;
 	flctl_mtd->dev.parent = &pdev->dev;
 	flctl_mtd->dev.parent = &pdev->dev;
 	flctl->pdev = pdev;
 	flctl->pdev = pdev;
 	flctl->hwecc = pdata->has_hwecc;
 	flctl->hwecc = pdata->has_hwecc;

+ 0 - 1
drivers/mtd/nand/sharpsl.c

@@ -147,7 +147,6 @@ static int sharpsl_nand_probe(struct platform_device *pdev)
 
 
 	/* Link the private data with the MTD structure */
 	/* Link the private data with the MTD structure */
 	mtd = nand_to_mtd(this);
 	mtd = nand_to_mtd(this);
-	mtd->priv = this;
 	mtd->dev.parent = &pdev->dev;
 	mtd->dev.parent = &pdev->dev;
 
 
 	platform_set_drvdata(pdev, sharpsl);
 	platform_set_drvdata(pdev, sharpsl);

+ 0 - 1
drivers/mtd/nand/socrates_nand.c

@@ -164,7 +164,6 @@ static int socrates_nand_probe(struct platform_device *ofdev)
 
 
 	nand_chip->priv = host;		/* link the private data structures */
 	nand_chip->priv = host;		/* link the private data structures */
 	nand_set_flash_node(nand_chip, ofdev->dev.of_node);
 	nand_set_flash_node(nand_chip, ofdev->dev.of_node);
-	mtd->priv = nand_chip;
 	mtd->name = "socrates_nand";
 	mtd->name = "socrates_nand";
 	mtd->dev.parent = &ofdev->dev;
 	mtd->dev.parent = &ofdev->dev;
 
 

+ 0 - 1
drivers/mtd/nand/sunxi_nand.c

@@ -1337,7 +1337,6 @@ static int sunxi_nand_chip_init(struct device *dev, struct sunxi_nfc *nfc,
 
 
 	mtd = nand_to_mtd(nand);
 	mtd = nand_to_mtd(nand);
 	mtd->dev.parent = dev;
 	mtd->dev.parent = dev;
-	mtd->priv = nand;
 
 
 	ret = nand_scan_ident(mtd, nsels, NULL);
 	ret = nand_scan_ident(mtd, nsels, NULL);
 	if (ret)
 	if (ret)

+ 0 - 1
drivers/mtd/nand/tmio_nand.c

@@ -382,7 +382,6 @@ static int tmio_probe(struct platform_device *dev)
 	platform_set_drvdata(dev, tmio);
 	platform_set_drvdata(dev, tmio);
 	nand_chip = &tmio->chip;
 	nand_chip = &tmio->chip;
 	mtd = nand_to_mtd(nand_chip);
 	mtd = nand_to_mtd(nand_chip);
-	mtd->priv = nand_chip;
 	mtd->name = "tmio-nand";
 	mtd->name = "tmio-nand";
 	mtd->dev.parent = &dev->dev;
 	mtd->dev.parent = &dev->dev;
 
 

+ 0 - 2
drivers/mtd/nand/txx9ndfmc.c

@@ -324,8 +324,6 @@ static int __init txx9ndfmc_probe(struct platform_device *dev)
 		mtd = nand_to_mtd(chip);
 		mtd = nand_to_mtd(chip);
 		mtd->dev.parent = &dev->dev;
 		mtd->dev.parent = &dev->dev;
 
 
-		mtd->priv = chip;
-
 		chip->read_byte = txx9ndfmc_read_byte;
 		chip->read_byte = txx9ndfmc_read_byte;
 		chip->read_buf = txx9ndfmc_read_buf;
 		chip->read_buf = txx9ndfmc_read_buf;
 		chip->write_buf = txx9ndfmc_write_buf;
 		chip->write_buf = txx9ndfmc_write_buf;

+ 0 - 1
drivers/mtd/nand/vf610_nfc.c

@@ -679,7 +679,6 @@ static int vf610_nfc_probe(struct platform_device *pdev)
 	chip = &nfc->chip;
 	chip = &nfc->chip;
 	mtd = nand_to_mtd(chip);
 	mtd = nand_to_mtd(chip);
 
 
-	mtd->priv = chip;
 	mtd->owner = THIS_MODULE;
 	mtd->owner = THIS_MODULE;
 	mtd->dev.parent = nfc->dev;
 	mtd->dev.parent = nfc->dev;
 	mtd->name = DRV_NAME;
 	mtd->name = DRV_NAME;