Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d9dccc68 authored by Boris Brezillon's avatar Boris Brezillon Committed by Brian Norris
Browse files

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: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
parent d39ddbd9
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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)