[PATCH 1/1]mtd:nand_mxs:update get/set features legacy function call

jameszxj jameszxj at gmail.com
Wed Jan 6 21:19:38 EST 2021


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


More information about the barebox mailing list