mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/1]mtd:nand_mxs:update get/set features legacy function call
@ 2021-01-07  2:19 jameszxj
  2021-01-07  7:17 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: jameszxj @ 2021-01-07  2:19 UTC (permalink / raw)
  To: barebox

update get/set features legacy function call to avoid NULL pointer crash.

Signed-off-by: zhengxiaojun <jameszxj at gmail.com>
--- 
 drivers/mtd/nand/nand_mxs.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/mtd/nand/nand_mxs.c b/drivers/mtd/nand/nand_mxs.c
index 9f7ab1442..ad8aeb41f 100644
--- a/drivers/mtd/nand/nand_mxs.c
+++ b/drivers/mtd/nand/nand_mxs.c
@@ -2055,14 +2055,12 @@ static int mxs_nand_enable_edo_mode(struct mxs_nand_info *info)
 		/* [1] send SET FEATURE commond to NAND */
 		feature[0] = mode;
 
-		ret = chip->legacy.set_features(chip,
-				ONFI_FEATURE_ADDR_TIMING_MODE, feature);
+		ret = nand_set_features(chip, ONFI_FEATURE_ADDR_TIMING_MODE, feature);
 		if (ret)
 			goto err_out;
 
 		/* [2] send GET FEATURE command to double-check the timing mode */
-		ret = chip->legacy.get_features(chip,
-				ONFI_FEATURE_ADDR_TIMING_MODE, feature);
+		ret = nand_get_features(chip, ONFI_FEATURE_ADDR_TIMING_MODE, feature);
 		if (ret || feature[0] != mode)
 			goto err_out;
 	}
-- 
2.29.2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-07  7:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-07  2:19 [PATCH 1/1]mtd:nand_mxs:update get/set features legacy function call jameszxj
2021-01-07  7:17 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox