[PATCH] mtd: nand: Fix retrieving nand_chip from mtd_info

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



With 76b6f74c53 we begin embedding a struct mtd_info into struct
nand_chip. With this mtd_to_nand() must be changed accordingly.

Fixes: 76b6f74c53 ("mtd: nand: Embed struct mtd_info into struct nand_chip")
Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 include/linux/mtd/nand.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index 762f9c4f2a..401f630570 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -803,7 +803,7 @@ const struct nand_sdr_timings *onfi_async_timing_mode_to_sdr_timings(int mode);
 
 static inline struct nand_chip *mtd_to_nand(struct mtd_info *mtd)
 {
-	return mtd->priv;
+	return container_of(mtd, struct nand_chip, mtd);
 }
 
 #endif /* __LINUX_MTD_NAND_H */
-- 
2.23.0


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux