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

Commit 4883090b authored by Boris Brezillon's avatar Boris Brezillon Committed by Brian Norris
Browse files

cris: nand: use the mtd instance embedded in struct nand_chip



struct nand_chip now embeds an mtd device. Patch all drivers to make use
of this mtd instance instead of using the instance embedded in their
private struct or dynamically allocated.

Signed-off-by: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: default avatarJesper Nilsson <jesper.nilsson@axis.com>
Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
parent ba4ed860
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -36,7 +36,6 @@
#define CE_BIT 12

struct mtd_info_wrapper {
	struct mtd_info info;
	struct nand_chip chip;
};

@@ -148,7 +147,7 @@ struct mtd_info *__init crisv32_nand_flash_probe(void)

	/* Get pointer to private data */
	this = &wrapper->chip;
	crisv32_mtd = &wrapper->info;
	crisv32_mtd = nand_to_mtd(this);

	/* Link the private data with the MTD structure */
	crisv32_mtd->priv = this;
+1 −2
Original line number Diff line number Diff line
@@ -31,7 +31,6 @@
#define BY_BIT 7

struct mtd_info_wrapper {
	struct mtd_info info;
	struct nand_chip chip;
};

@@ -129,7 +128,7 @@ struct mtd_info *__init crisv32_nand_flash_probe(void)

	/* Get pointer to private data */
	this = &wrapper->chip;
	crisv32_mtd = &wrapper->info;
	crisv32_mtd = nand_to_mtd(this);

	pa_oe.oe |= 1 << CE_BIT;
	pa_oe.oe |= 1 << ALE_BIT;