Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 37f5a546 authored by Boris Brezillon's avatar Boris Brezillon Committed by Brian Norris
Browse files

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: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
parent 2d3b77ba
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -193,9 +193,6 @@ static int ams_delta_init(struct platform_device *pdev)
	ams_delta_mtd = nand_to_mtd(this);
	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,
	 * it should have been already requested from the
+0 −1
Original line number Diff line number Diff line
@@ -2128,7 +2128,6 @@ static int atmel_nand_probe(struct platform_device *pdev)
	}

	nand_chip->priv = host;		/* link the private data structures */
	mtd->priv = nand_chip;
	mtd->dev.parent = &pdev->dev;

	/* Set address of NAND IO lines */
+0 −1
Original line number Diff line number Diff line
@@ -441,7 +441,6 @@ static int au1550nd_probe(struct platform_device *pdev)

	this = &ctx->chip;
	mtd = nand_to_mtd(this);
	mtd->priv = this;
	mtd->dev.parent = &pdev->dev;

	/* figure out which CS# r->start belongs to */
+0 −1
Original line number Diff line number Diff line
@@ -37,7 +37,6 @@ static int bcm47xxnflash_probe(struct platform_device *pdev)
	b47n->nand_chip.priv = b47n;
	mtd = nand_to_mtd(&b47n->nand_chip);
	mtd->dev.parent = &pdev->dev;
	mtd->priv = &b47n->nand_chip; /* Required */
	b47n->cc = container_of(nflash, struct bcma_drv_cc, nflash);

	if (b47n->cc->core->bus->chipinfo.id == BCMA_CHIP_ID_BCM4706) {
+0 −1
Original line number Diff line number Diff line
@@ -782,7 +782,6 @@ static int bf5xx_nand_probe(struct platform_device *pdev)
	chip->chip_delay   = 0;

	/* initialise mtd info data struct */
	mtd->priv	= chip;
	mtd->dev.parent = &pdev->dev;

	/* initialise the hardware */
Loading