blackfin: nand: make use of mtd_to_nand() where appropriate
authorBoris BREZILLON <boris.brezillon@free-electrons.com>
Tue, 1 Dec 2015 11:02:59 +0000 (12:02 +0100)
committerBrian Norris <computersforpeace@gmail.com>
Tue, 8 Dec 2015 21:02:57 +0000 (13:02 -0800)
mtd_to_nand() was recently introduced to avoid direct accesses to the
mtd->priv field. Update all blackfin specific implementations to use
this helper.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
arch/blackfin/mach-bf537/boards/stamp.c
arch/blackfin/mach-bf561/boards/acvilon.c

index 88a19fc9844d8395900dd94b48e6a22fec30767a..c181543a399aa2e36752f2153fe429bf89283fa9 100644 (file)
@@ -404,7 +404,7 @@ static struct mtd_partition bfin_plat_nand_partitions[] = {
 #define BFIN_NAND_PLAT_ALE 1
 static void bfin_plat_nand_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
 {
-       struct nand_chip *this = mtd->priv;
+       struct nand_chip *this = mtd_to_nand(mtd);
 
        if (cmd == NAND_CMD_NONE)
                return;
index 6ab951534d790b6060aeea63cda8c1b158d90470..37f8f25a1347fbed8c77ff6b498e1a062afb4321 100644 (file)
@@ -267,7 +267,7 @@ static struct mtd_partition bfin_plat_nand_partitions[] = {
 static void bfin_plat_nand_cmd_ctrl(struct mtd_info *mtd, int cmd,
                                    unsigned int ctrl)
 {
-       struct nand_chip *this = mtd->priv;
+       struct nand_chip *this = mtd_to_nand(mtd);
 
        if (cmd == NAND_CMD_NONE)
                return;