mips: nand: make use of mtd_to_nand() where appropriate
authorBoris BREZILLON <boris.brezillon@free-electrons.com>
Tue, 1 Dec 2015 11:03:01 +0000 (12:03 +0100)
committerBrian Norris <computersforpeace@gmail.com>
Tue, 8 Dec 2015 21:03:07 +0000 (13:03 -0800)
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>
arch/mips/alchemy/devboards/db1200.c
arch/mips/alchemy/devboards/db1300.c
arch/mips/alchemy/devboards/db1550.c
arch/mips/pnx833x/common/platform.c
arch/mips/rb532/devices.c

index 8c13675a12e74618b64b640f852f30856970fa85..992442a03d8ba00d5ab7541b57074ebf3ec0a30d 100644 (file)
@@ -200,7 +200,7 @@ static struct i2c_board_info db1200_i2c_devs[] __initdata = {
 static void au1200_nand_cmd_ctrl(struct mtd_info *mtd, int cmd,
                                 unsigned int ctrl)
 {
-       struct nand_chip *this = mtd->priv;
+       struct nand_chip *this = mtd_to_nand(mtd);
        unsigned long ioaddr = (unsigned long)this->IO_ADDR_W;
 
        ioaddr &= 0xffffff00;
index b58077008a5384a98e74bd76ef222a70bcca48a1..d3c087f59f1a9fa4d7f9a69dcad346f3aabe3b9a 100644 (file)
@@ -150,7 +150,7 @@ static void __init db1300_gpio_config(void)
 static void au1300_nand_cmd_ctrl(struct mtd_info *mtd, int cmd,
                                 unsigned int ctrl)
 {
-       struct nand_chip *this = mtd->priv;
+       struct nand_chip *this = mtd_to_nand(mtd);
        unsigned long ioaddr = (unsigned long)this->IO_ADDR_W;
 
        ioaddr &= 0xffffff00;
index 5740bcfdfc7f622b76402a3c0551e3c475ea7099..b518f029f5e7bcd97e62b5017408652fa7a111dd 100644 (file)
@@ -128,7 +128,7 @@ static struct i2c_board_info db1550_i2c_devs[] __initdata = {
 static void au1550_nand_cmd_ctrl(struct mtd_info *mtd, int cmd,
                                 unsigned int ctrl)
 {
-       struct nand_chip *this = mtd->priv;
+       struct nand_chip *this = mtd_to_nand(mtd);
        unsigned long ioaddr = (unsigned long)this->IO_ADDR_W;
 
        ioaddr &= 0xffffff00;
index b4b774bc3178835d9288cb5043291e3ba87195eb..3cd357737a267c38dc20b85724b723f37f26bd01 100644 (file)
@@ -180,7 +180,7 @@ static struct platform_device pnx833x_sata_device = {
 static void
 pnx833x_flash_nand_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
 {
-       struct nand_chip *this = mtd->priv;
+       struct nand_chip *this = mtd_to_nand(mtd);
        unsigned long nandaddr = (unsigned long)this->IO_ADDR_W;
 
        if (cmd == NAND_CMD_NONE)
index 9bd7a2de0765fc13dcd1fbffa493b47415abb22a..0966adccf52005b35c308bd75b8ab92936eb6b99 100644 (file)
@@ -148,7 +148,7 @@ static int rb532_dev_ready(struct mtd_info *mtd)
 
 static void rb532_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
 {
-       struct nand_chip *chip = mtd->priv;
+       struct nand_chip *chip = mtd_to_nand(mtd);
        unsigned char orbits, nandbits;
 
        if (ctrl & NAND_CTRL_CHANGE) {
This page took 0.027574 seconds and 5 git commands to generate.