cris: nand: make use of mtd_to_nand() where appropriate

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Tue Jan 12 15:59:14 PST 2016


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=04104422bce2693d07001dc4efb5cb935c5053bb
Commit:     04104422bce2693d07001dc4efb5cb935c5053bb
Parent:     9eba47ddd8fee8a21f45e6e1d707103f040d90c7
Author:     Boris BREZILLON <boris.brezillon at free-electrons.com>
AuthorDate: Tue Dec 1 12:03:00 2015 +0100
Committer:  Brian Norris <computersforpeace at gmail.com>
CommitDate: Tue Dec 8 13:02:46 2015 -0800

    cris: nand: make use of mtd_to_nand() where appropriate
    
    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 at free-electrons.com>
    Acked-by: Brian Norris <computersforpeace at gmail.com>
    Acked-by: Jesper Nilsson <jesper.nilsson at axis.com>
    Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 arch/cris/arch-v32/drivers/mach-a3/nandflash.c | 2 +-
 arch/cris/arch-v32/drivers/mach-fs/nandflash.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/cris/arch-v32/drivers/mach-a3/nandflash.c b/arch/cris/arch-v32/drivers/mach-a3/nandflash.c
index 7fb5212..db953cf 100644
--- a/arch/cris/arch-v32/drivers/mach-a3/nandflash.c
+++ b/arch/cris/arch-v32/drivers/mach-a3/nandflash.c
@@ -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);
 
diff --git a/arch/cris/arch-v32/drivers/mach-fs/nandflash.c b/arch/cris/arch-v32/drivers/mach-fs/nandflash.c
index e032384..22a6467 100644
--- a/arch/cris/arch-v32/drivers/mach-fs/nandflash.c
+++ b/arch/cris/arch-v32/drivers/mach-fs/nandflash.c
@@ -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);
 



More information about the linux-mtd-cvs mailing list