diff options
author | Scott Wood <oss@buserror.net> | 2016-05-30 13:57:55 -0500 |
---|---|---|
committer | Scott Wood <oss@buserror.net> | 2016-06-03 20:27:48 -0500 |
commit | b616d9b0a708eb90eb474e1b6ec6dfe4c48a1678 (patch) | |
tree | e3710a7c0725a062e6049fe6c281575587ea6b66 /drivers/dfu/dfu_nand.c | |
parent | 151c06ec61d74b77cf27d6d622bab6370c949c66 (diff) | |
download | u-boot-imx-b616d9b0a708eb90eb474e1b6ec6dfe4c48a1678.zip u-boot-imx-b616d9b0a708eb90eb474e1b6ec6dfe4c48a1678.tar.gz u-boot-imx-b616d9b0a708eb90eb474e1b6ec6dfe4c48a1678.tar.bz2 |
nand: Embed mtd_info in struct nand_chip
nand_info[] is now an array of pointers, with the actual mtd_info
instance embedded in struct nand_chip.
This is in preparation for syncing the NAND code with Linux 4.6,
which makes the same change to struct nand_chip. It's in a separate
commit due to the large amount of changes required to accommodate the
change to nand_info[].
Signed-off-by: Scott Wood <oss@buserror.net>
Diffstat (limited to 'drivers/dfu/dfu_nand.c')
-rw-r--r-- | drivers/dfu/dfu_nand.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/dfu/dfu_nand.c b/drivers/dfu/dfu_nand.c index 4652541..ab782be 100644 --- a/drivers/dfu/dfu_nand.c +++ b/drivers/dfu/dfu_nand.c @@ -39,12 +39,12 @@ static int nand_block_op(enum dfu_op op, struct dfu_entity *dfu, if (nand_curr_device < 0 || nand_curr_device >= CONFIG_SYS_MAX_NAND_DEVICE || - !nand_info[nand_curr_device].name) { + !nand_info[nand_curr_device]->name) { printf("%s: invalid nand device\n", __func__); return -1; } - mtd = &nand_info[nand_curr_device]; + mtd = nand_info[nand_curr_device]; if (op == DFU_OP_READ) { ret = nand_read_skip_bad(mtd, start, &count, &actual, @@ -147,12 +147,12 @@ static int dfu_flush_medium_nand(struct dfu_entity *dfu) if (nand_curr_device < 0 || nand_curr_device >= CONFIG_SYS_MAX_NAND_DEVICE || - !nand_info[nand_curr_device].name) { + !nand_info[nand_curr_device]->name) { printf("%s: invalid nand device\n", __func__); return -1; } - mtd = &nand_info[nand_curr_device]; + mtd = nand_info[nand_curr_device]; memset(&opts, 0, sizeof(opts)); opts.offset = dfu->data.nand.start + dfu->offset + |