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

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

mtd: nand: add nand_to_mtd() helper



Add a new helper to retrieve the MTD device attached to a NAND chip.

Signed-off-by: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
parent ed4f85c0
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -737,6 +737,11 @@ static inline struct nand_chip *mtd_to_nand(struct mtd_info *mtd)
	return mtd->priv;
}

static inline struct mtd_info *nand_to_mtd(struct nand_chip *chip)
{
	return &chip->mtd;
}

/*
 * NAND Flash Manufacturer ID Codes
 */