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

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Brian Norris <computersforpeace@gmail.com>
Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
arch/cris/arch-v32/drivers/mach-a3/nandflash.c
arch/cris/arch-v32/drivers/mach-fs/nandflash.c

index 7fb52128ddc900ebfba2952654798ab04d8e5b97..db953cfabee11c4021f907e812c36341bd6db3ac 100644 (file)
@@ -52,7 +52,7 @@ static void crisv32_hwcontrol(struct mtd_info *mtd, int cmd,
 {
        unsigned long flags;
        reg_pio_rw_dout dout;
-       struct nand_chip *this = mtd->priv;
+       struct nand_chip *this = mtd_to_nand(mtd);
 
        local_irq_save(flags);
 
index e03238454b0ee541e0daa556493039cedf776dbc..22a6467ffe1f1d4cd75ab7ed36914609cc83696a 100644 (file)
@@ -51,7 +51,7 @@ static void crisv32_hwcontrol(struct mtd_info *mtd, int cmd,
 {
        unsigned long flags;
        reg_gio_rw_pa_dout dout;
-       struct nand_chip *this = mtd->priv;
+       struct nand_chip *this = mtd_to_nand(mtd);
 
        local_irq_save(flags);