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

1234567891011121314151617181920212223242526272829303132
  1. From 5175e1d27c52c0958b2d1cb4391a611444aaf432 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/91] 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. diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
  12. index a4839b3..c75424f 100644
  13. --- a/include/linux/mtd/nand.h
  14. +++ b/include/linux/mtd/nand.h
  15. @@ -724,6 +724,11 @@ static inline struct nand_chip *mtd_to_nand(struct mtd_info *mtd)
  16. return mtd->priv;
  17. }
  18. +static inline struct mtd_info *nand_to_mtd(struct nand_chip *chip)
  19. +{
  20. + return &chip->mtd;
  21. +}
  22. +
  23. /*
  24. * NAND Flash Manufacturer ID Codes
  25. */
  26. --
  27. 1.7.10.4