From 616d942c3eec713d8addf9cbc09a9349f004a135 Mon Sep 17 00:00:00 2001 From: jameszxj Date: Thu, 7 Jan 2021 10:19:38 +0800 Subject: mtd:nand_mxs:update get/set features legacy function call update get/set features legacy function call to avoid NULL pointer crash. Signed-off-by: zhengxiaojun Signed-off-by: Sascha Hauer --- 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 9f7ab14426..ad8aeb41fc 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; } -- cgit v1.2.3