diff options
author | Boris BREZILLON <boris.brezillon@free-electrons.com> | 2015-12-10 11:00:41 +0300 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2016-01-07 21:23:41 +0300 |
commit | d699ed250c07384840263bbbf69cf7b90b45470c (patch) | |
tree | 954ed7cebade37cdf63b87df7e00d6713545c2c1 /drivers/mtd/nand/ams-delta.c | |
parent | d9dccc68c5cae4ef7b4a617a93a87b11c6f0c53a (diff) | |
download | linux-d699ed250c07384840263bbbf69cf7b90b45470c.tar.xz |
mtd: nand: make use of nand_set/get_controller_data() helpers
New helpers have been added to avoid directly accessing chip->field. Use
them where appropriate.
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
[Brian: fixed a few rebase conflicts]
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'drivers/mtd/nand/ams-delta.c')
-rw-r--r-- | drivers/mtd/nand/ams-delta.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mtd/nand/ams-delta.c b/drivers/mtd/nand/ams-delta.c index 1a18938565ac..68b58c85789c 100644 --- a/drivers/mtd/nand/ams-delta.c +++ b/drivers/mtd/nand/ams-delta.c @@ -65,7 +65,7 @@ static struct mtd_partition partition_info[] = { static void ams_delta_write_byte(struct mtd_info *mtd, u_char byte) { struct nand_chip *this = mtd_to_nand(mtd); - void __iomem *io_base = this->priv; + void __iomem *io_base = (void __iomem *)nand_get_controller_data(this); writew(0, io_base + OMAP_MPUIO_IO_CNTL); writew(byte, this->IO_ADDR_W); @@ -78,7 +78,7 @@ static u_char ams_delta_read_byte(struct mtd_info *mtd) { u_char res; struct nand_chip *this = mtd_to_nand(mtd); - void __iomem *io_base = this->priv; + void __iomem *io_base = (void __iomem *)nand_get_controller_data(this); gpio_set_value(AMS_DELTA_GPIO_PIN_NAND_NRE, 0); ndelay(40); @@ -206,7 +206,7 @@ static int ams_delta_init(struct platform_device *pdev) goto out_free; } - this->priv = io_base; + nand_set_controller_data(this, (void *)io_base); /* Set address of NAND IO lines */ this->IO_ADDR_R = io_base + OMAP_MPUIO_INPUT_LATCH; |