aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBoris BREZILLON <boris.brezillon@free-electrons.com>2015-12-10 03:00:40 -0500
committerBrian Norris <computersforpeace@gmail.com>2016-01-07 13:23:40 -0500
commitd9dccc68c5cae4ef7b4a617a93a87b11c6f0c53a (patch)
treeaddd400ecadeadf376b969afe59b728a6f9b8422
parentd39ddbd9ef70949bb78283a067e1b3366111dd90 (diff)
ARM: 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> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
-rw-r--r--arch/arm/mach-ixp4xx/ixdp425-setup.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/mach-ixp4xx/ixdp425-setup.c b/arch/arm/mach-ixp4xx/ixdp425-setup.c
index 333b0f9ea635..508c2d7786e2 100644
--- a/arch/arm/mach-ixp4xx/ixdp425-setup.c
+++ b/arch/arm/mach-ixp4xx/ixdp425-setup.c
@@ -77,7 +77,7 @@ static void
77ixdp425_flash_nand_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl) 77ixdp425_flash_nand_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
78{ 78{
79 struct nand_chip *this = mtd_to_nand(mtd); 79 struct nand_chip *this = mtd_to_nand(mtd);
80 int offset = (int)this->priv; 80 int offset = (int)nand_get_controller_data(this);
81 81
82 if (ctrl & NAND_CTRL_CHANGE) { 82 if (ctrl & NAND_CTRL_CHANGE) {
83 if (ctrl & NAND_NCE) { 83 if (ctrl & NAND_NCE) {
@@ -88,7 +88,7 @@ ixdp425_flash_nand_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
88 88
89 offset = (ctrl & NAND_CLE) ? IXDP425_NAND_CMD_BYTE : 0; 89 offset = (ctrl & NAND_CLE) ? IXDP425_NAND_CMD_BYTE : 0;
90 offset |= (ctrl & NAND_ALE) ? IXDP425_NAND_ADDR_BYTE : 0; 90 offset |= (ctrl & NAND_ALE) ? IXDP425_NAND_ADDR_BYTE : 0;
91 this->priv = (void *)offset; 91 nand_set_controller_data(this, (void *)offset);
92 } 92 }
93 93
94 if (cmd != NAND_CMD_NONE) 94 if (cmd != NAND_CMD_NONE)