diff options
author | jameszxj <jameszxj@gmail.com> | 2021-01-07 10:19:38 +0800 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2021-01-07 08:15:48 +0100 |
commit | 616d942c3eec713d8addf9cbc09a9349f004a135 (patch) | |
tree | 447ad766b1cbc88396e5ad7e708cd0d7ed3cd797 | |
parent | b4f8981d9f21965542ae57507df67326bcb852ff (diff) | |
download | barebox-616d942c3eec713d8addf9cbc09a9349f004a135.tar.gz barebox-616d942c3eec713d8addf9cbc09a9349f004a135.tar.xz |
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 <jameszxj at gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | drivers/mtd/nand/nand_mxs.c | 6 |
1 files 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; } |