From: Boris BREZILLON Date: Tue, 1 Dec 2015 11:03:02 +0000 (+0100) Subject: sh: nand: make use of mtd_to_nand() where appropriate X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7326ffef788dd5823c820a6ac5b5e864e8a486a0;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Brian Norris --- diff --git a/arch/sh/boards/mach-migor/setup.c b/arch/sh/boards/mach-migor/setup.c index 29b7c0dcfc51..8673f91ebd41 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;