mtd: nand: make use of mtd_to_nand() in NAND drivers
mtd_to_nand() was recently introduced to avoid direct accesses to the mtd->priv field. Update all NAND drivers to use it. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
This commit is contained in:

committed by
Brian Norris

parent
a83dfa9285
commit
4bd4ebcc54
@@ -64,7 +64,7 @@ static inline void r852_write_reg_dword(struct r852_device *dev,
|
||||
/* returns pointer to our private structure */
|
||||
static inline struct r852_device *r852_get_dev(struct mtd_info *mtd)
|
||||
{
|
||||
struct nand_chip *chip = mtd->priv;
|
||||
struct nand_chip *chip = mtd_to_nand(mtd);
|
||||
return chip->priv;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user