Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mips: 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 MIPS specific implementations to use this
helper.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>

authored by

Boris BREZILLON and committed by
Brian Norris
b1afda0e 9eba47dd

+5 -5
+1 -1
arch/mips/alchemy/devboards/db1200.c
··· 200 200 static void au1200_nand_cmd_ctrl(struct mtd_info *mtd, int cmd, 201 201 unsigned int ctrl) 202 202 { 203 - struct nand_chip *this = mtd->priv; 203 + struct nand_chip *this = mtd_to_nand(mtd); 204 204 unsigned long ioaddr = (unsigned long)this->IO_ADDR_W; 205 205 206 206 ioaddr &= 0xffffff00;
+1 -1
arch/mips/alchemy/devboards/db1300.c
··· 150 150 static void au1300_nand_cmd_ctrl(struct mtd_info *mtd, int cmd, 151 151 unsigned int ctrl) 152 152 { 153 - struct nand_chip *this = mtd->priv; 153 + struct nand_chip *this = mtd_to_nand(mtd); 154 154 unsigned long ioaddr = (unsigned long)this->IO_ADDR_W; 155 155 156 156 ioaddr &= 0xffffff00;
+1 -1
arch/mips/alchemy/devboards/db1550.c
··· 128 128 static void au1550_nand_cmd_ctrl(struct mtd_info *mtd, int cmd, 129 129 unsigned int ctrl) 130 130 { 131 - struct nand_chip *this = mtd->priv; 131 + struct nand_chip *this = mtd_to_nand(mtd); 132 132 unsigned long ioaddr = (unsigned long)this->IO_ADDR_W; 133 133 134 134 ioaddr &= 0xffffff00;
+1 -1
arch/mips/pnx833x/common/platform.c
··· 180 180 static void 181 181 pnx833x_flash_nand_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl) 182 182 { 183 - struct nand_chip *this = mtd->priv; 183 + struct nand_chip *this = mtd_to_nand(mtd); 184 184 unsigned long nandaddr = (unsigned long)this->IO_ADDR_W; 185 185 186 186 if (cmd == NAND_CMD_NONE)
+1 -1
arch/mips/rb532/devices.c
··· 148 148 149 149 static void rb532_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl) 150 150 { 151 - struct nand_chip *chip = mtd->priv; 151 + struct nand_chip *chip = mtd_to_nand(mtd); 152 152 unsigned char orbits, nandbits; 153 153 154 154 if (ctrl & NAND_CTRL_CHANGE) {