Эх сурвалжийг харах

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@free-electrons.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Boris BREZILLON 9 жил өмнө
parent
commit
7326ffef78

+ 1 - 1
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,
 static void migor_nand_flash_cmd_ctl(struct mtd_info *mtd, int cmd,
 				     unsigned int ctrl)
 				     unsigned int ctrl)
 {
 {
-	struct nand_chip *chip = mtd->priv;
+	struct nand_chip *chip = mtd_to_nand(mtd);
 
 
 	if (cmd == NAND_CMD_NONE)
 	if (cmd == NAND_CMD_NONE)
 		return;
 		return;