sh: nand: make use of mtd_to_nand() where appropriate
authorBoris BREZILLON <boris.brezillon@free-electrons.com>
Tue, 1 Dec 2015 11:03:02 +0000 (12:03 +0100)
committerBrian Norris <computersforpeace@gmail.com>
Tue, 8 Dec 2015 18:46:13 +0000 (10:46 -0800)
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@free-electrons.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
arch/sh/boards/mach-migor/setup.c

index 29b7c0dcfc51c6e5c200d1c3c4d377627a3b50cf..8673f91ebd41b5743401177a56fa582e2d5350b9 100644 (file)
@@ -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;