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

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


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

    sh: 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 SH specific implementations to use this
    helper.
    
    Signed-off-by: Boris Brezillon <boris.brezillon at free-electrons.com>
    Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 arch/sh/boards/mach-migor/setup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/sh/boards/mach-migor/setup.c b/arch/sh/boards/mach-migor/setup.c
index 29b7c0d..8673f91 100644
--- a/arch/sh/boards/mach-migor/setup.c
+++ b/arch/sh/boards/mach-migor/setup.c
@@ -167,7 +167,7 @@ static struct mtd_partition migor_nand_flash_partitions[] = {
 static void migor_nand_flash_cmd_ctl(struct mtd_info *mtd, int cmd,
 				     unsigned int ctrl)
 {
-	struct nand_chip *chip = mtd->priv;
+	struct nand_chip *chip = mtd_to_nand(mtd);
 
 	if (cmd == NAND_CMD_NONE)
 		return;



More information about the linux-mtd-cvs mailing list