diff options
author | Boris BREZILLON <boris.brezillon@free-electrons.com> | 2015-12-01 12:03:04 +0100 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2015-12-08 21:24:36 +0100 |
commit | 4bd4ebcc540c35d4477b098cf26394f976551464 (patch) | |
tree | 2ceb0ef03c53f3f65d881a1d15d2445b602bdb38 /drivers/mtd/nand/cmx270_nand.c | |
parent | staging: mt29f_spinand: make use of mtd_to_nand() (diff) | |
download | linux-4bd4ebcc540c35d4477b098cf26394f976551464.tar.xz linux-4bd4ebcc540c35d4477b098cf26394f976551464.zip |
mtd: nand: make use of mtd_to_nand() in NAND drivers
mtd_to_nand() was recently introduced to avoid direct accesses to the
mtd->priv field. Update all NAND drivers to use it.
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'drivers/mtd/nand/cmx270_nand.c')
-rw-r--r-- | drivers/mtd/nand/cmx270_nand.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mtd/nand/cmx270_nand.c b/drivers/mtd/nand/cmx270_nand.c index 66ec95e6ca6c..43bded66bc44 100644 --- a/drivers/mtd/nand/cmx270_nand.c +++ b/drivers/mtd/nand/cmx270_nand.c @@ -53,7 +53,7 @@ static struct mtd_partition partition_info[] = { static u_char cmx270_read_byte(struct mtd_info *mtd) { - struct nand_chip *this = mtd->priv; + struct nand_chip *this = mtd_to_nand(mtd); return (readl(this->IO_ADDR_R) >> 16); } @@ -61,7 +61,7 @@ static u_char cmx270_read_byte(struct mtd_info *mtd) static void cmx270_write_buf(struct mtd_info *mtd, const u_char *buf, int len) { int i; - struct nand_chip *this = mtd->priv; + struct nand_chip *this = mtd_to_nand(mtd); for (i=0; i<len; i++) writel((*buf++ << 16), this->IO_ADDR_W); @@ -70,7 +70,7 @@ static void cmx270_write_buf(struct mtd_info *mtd, const u_char *buf, int len) static void cmx270_read_buf(struct mtd_info *mtd, u_char *buf, int len) { int i; - struct nand_chip *this = mtd->priv; + struct nand_chip *this = mtd_to_nand(mtd); for (i=0; i<len; i++) *buf++ = readl(this->IO_ADDR_R) >> 16; @@ -94,7 +94,7 @@ static void nand_cs_off(void) static void cmx270_hwcontrol(struct mtd_info *mtd, int dat, unsigned int ctrl) { - struct nand_chip* this = mtd->priv; + struct nand_chip *this = mtd_to_nand(mtd); unsigned int nandaddr = (unsigned int)this->IO_ADDR_W; dsb(); |