From: Marcel Ziswiler <marcel@ziswiler.com>
Date: Sun, 22 Jun 2008 14:30:06 +0000 (+0200)
Subject: NAND: chip->state does not always get set.
X-Git-Tag: v2025.01-rc5-pxa1908~21997^2~7
X-Git-Url: http://git.dujemihanovic.xyz/img/%7B%7B%20%28.OutputFormats.Get?a=commitdiff_plain;h=eafcabd15f00c142156235c519fcc55b10993241;p=u-boot.git

NAND: chip->state does not always get set.

Fixes an issue with chip->state not always being set causing troubles.

Signed-off-by: Marcel Ziswiler <marcel@ziswiler.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
---

diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index cf2f374554..a29ff1146f 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -773,6 +773,7 @@ nand_get_device(struct nand_chip *chip, struct mtd_info *mtd, int new_state)
 #else
 static int nand_get_device (struct nand_chip *this, struct mtd_info *mtd, int new_state)
 {
+	this->state = new_state;
 	return 0;
 }
 #endif