0053-mtd-nand-add-nand_to_mtd-helper.patch 792 B

123456789101112131415161718192021222324252627
  1. From 86e5fe2edbe2ca4f0d83a26d9b3d02620cd78f37 Mon Sep 17 00:00:00 2001
  2. From: Boris BREZILLON <[email protected]>
  3. Date: Tue, 1 Dec 2015 12:03:07 +0100
  4. Subject: [PATCH 53/81] mtd: nand: add nand_to_mtd() helper
  5. Add a new helper to retrieve the MTD device attached to a NAND chip.
  6. Signed-off-by: Boris Brezillon <[email protected]>
  7. Signed-off-by: Brian Norris <[email protected]>
  8. ---
  9. include/linux/mtd/nand.h | 5 +++++
  10. 1 file changed, 5 insertions(+)
  11. --- a/include/linux/mtd/nand.h
  12. +++ b/include/linux/mtd/nand.h
  13. @@ -724,6 +724,11 @@ static inline struct nand_chip *mtd_to_n
  14. return mtd->priv;
  15. }
  16. +static inline struct mtd_info *nand_to_mtd(struct nand_chip *chip)
  17. +{
  18. + return &chip->mtd;
  19. +}
  20. +
  21. /*
  22. * NAND Flash Manufacturer ID Codes
  23. */