diff options
author | Tom Rini <trini@konsulko.com> | 2016-09-06 11:28:37 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-09-06 11:28:37 -0400 |
commit | 57288e3d9591b95287b92b9ba25aa6355daeb3c3 (patch) | |
tree | b794e8ab6f1c4efe39753b7a2b8e7fb85829833d /cmd/nand.c | |
parent | 0068dd687d38e41eafa51135bc10e0f04a928601 (diff) | |
parent | 8b7d51249eca113c4965a7c417f33d7eb569434b (diff) |
Merge git://git.denx.de/u-boot-nand-flash
Diffstat (limited to 'cmd/nand.c')
-rw-r--r-- | cmd/nand.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd/nand.c b/cmd/nand.c index 97f1619ffd..c16ec77ed4 100644 --- a/cmd/nand.c +++ b/cmd/nand.c @@ -191,7 +191,7 @@ int do_nand_env_oob(cmd_tbl_t *cmdtp, int argc, char *const argv[]) struct mtd_info *mtd = nand_info[0]; char *cmd = argv[1]; - if (CONFIG_SYS_MAX_NAND_DEVICE == 0 || !mtd->name) { + if (CONFIG_SYS_MAX_NAND_DEVICE == 0 || !mtd) { puts("no devices available\n"); return 1; } @@ -398,7 +398,7 @@ static int do_nand(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) putc('\n'); for (i = 0; i < CONFIG_SYS_MAX_NAND_DEVICE; i++) { - if (nand_info[i]->name) + if (nand_info[i]) nand_print_and_set_info(i); } return 0; @@ -433,7 +433,7 @@ static int do_nand(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) * for another device is to be used. */ if (dev < 0 || dev >= CONFIG_SYS_MAX_NAND_DEVICE || - !nand_info[dev]->name) { + !nand_info[dev]) { puts("\nno devices available\n"); return 1; } @@ -991,7 +991,7 @@ usage: idx = simple_strtoul(boot_device, NULL, 16); - if (idx < 0 || idx >= CONFIG_SYS_MAX_NAND_DEVICE || !nand_info[idx]->name) { + if (idx < 0 || idx >= CONFIG_SYS_MAX_NAND_DEVICE || !nand_info[idx]) { printf("\n** Device %d not available\n", idx); bootstage_error(BOOTSTAGE_ID_NAND_AVAILABLE); return 1; |