summaryrefslogtreecommitdiffstats
path: root/include/linux/mtd/nand.h
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2019-09-12 11:14:21 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2019-09-12 11:16:03 +0200
commitfd72834fa74b604efc7b2af5f40ccab5796b79e7 (patch)
tree847686d5b374ce48e2c1f88fc13962632561a809 /include/linux/mtd/nand.h
parent47338967d2cc00b37f887e2eef52af52e3943fce (diff)
downloadbarebox-fd72834fa74b604efc7b2af5f40ccab5796b79e7.tar.gz
barebox-fd72834fa74b604efc7b2af5f40ccab5796b79e7.tar.xz
mtd: nand: Fix retrieving nand_chip from mtd_info
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@pengutronix.de>
Diffstat (limited to 'include/linux/mtd/nand.h')
-rw-r--r--include/linux/mtd/nand.h2
1 files changed, 1 insertions, 1 deletions
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 */