ARM: make use of nand_set/get_controller_data() helpers

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Tue Jan 12 15:59:31 PST 2016


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=d9dccc68c5cae4ef7b4a617a93a87b11c6f0c53a
Commit:     d9dccc68c5cae4ef7b4a617a93a87b11c6f0c53a
Parent:     d39ddbd9ef70949bb78283a067e1b3366111dd90
Author:     Boris BREZILLON <boris.brezillon at free-electrons.com>
AuthorDate: Thu Dec 10 09:00:40 2015 +0100
Committer:  Brian Norris <computersforpeace at gmail.com>
CommitDate: Thu Jan 7 10:23:40 2016 -0800

    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 at free-electrons.com>
    Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 arch/arm/mach-ixp4xx/ixdp425-setup.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-ixp4xx/ixdp425-setup.c b/arch/arm/mach-ixp4xx/ixdp425-setup.c
index 333b0f9..508c2d7 100644
--- a/arch/arm/mach-ixp4xx/ixdp425-setup.c
+++ b/arch/arm/mach-ixp4xx/ixdp425-setup.c
@@ -77,7 +77,7 @@ static void
 ixdp425_flash_nand_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
 {
 	struct nand_chip *this = mtd_to_nand(mtd);
-	int offset = (int)this->priv;
+	int offset = (int)nand_get_controller_data(this);
 
 	if (ctrl & NAND_CTRL_CHANGE) {
 		if (ctrl & NAND_NCE) {
@@ -88,7 +88,7 @@ ixdp425_flash_nand_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
 
 		offset = (ctrl & NAND_CLE) ? IXDP425_NAND_CMD_BYTE : 0;
 		offset |= (ctrl & NAND_ALE) ? IXDP425_NAND_ADDR_BYTE : 0;
-		this->priv = (void *)offset;
+		nand_set_controller_data(this, (void *)offset);
 	}
 
 	if (cmd != NAND_CMD_NONE)



More information about the linux-mtd-cvs mailing list