summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 */