diff options
Diffstat (limited to 'cmd/mtd.c')
-rw-r--r-- | cmd/mtd.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -285,12 +285,12 @@ static int do_mtd_io(struct cmd_tbl *cmdtp, int flag, int argc, goto out_put_mtd; } - user_addr = simple_strtoul(argv[0], NULL, 16); + user_addr = hextoul(argv[0], NULL); argc--; argv++; } - start_off = argc > 0 ? simple_strtoul(argv[0], NULL, 16) : 0; + start_off = argc > 0 ? hextoul(argv[0], NULL) : 0; if (!mtd_is_aligned_with_min_io_size(mtd, start_off)) { printf("Offset not aligned with a page (0x%x)\n", mtd->writesize); @@ -299,7 +299,7 @@ static int do_mtd_io(struct cmd_tbl *cmdtp, int flag, int argc, } default_len = dump ? mtd->writesize : mtd->size; - len = argc > 1 ? simple_strtoul(argv[1], NULL, 16) : default_len; + len = argc > 1 ? hextoul(argv[1], NULL) : default_len; if (!mtd_is_aligned_with_min_io_size(mtd, len)) { len = round_up(len, mtd->writesize); printf("Size not on a page boundary (0x%x), rounding to 0x%llx\n", @@ -411,8 +411,8 @@ static int do_mtd_erase(struct cmd_tbl *cmdtp, int flag, int argc, argc -= 2; argv += 2; - off = argc > 0 ? simple_strtoul(argv[0], NULL, 16) : 0; - len = argc > 1 ? simple_strtoul(argv[1], NULL, 16) : mtd->size; + off = argc > 0 ? hextoul(argv[0], NULL) : 0; + len = argc > 1 ? hextoul(argv[1], NULL) : mtd->size; if (!mtd_is_aligned_with_block_size(mtd, off)) { printf("Offset not aligned with a block (0x%x)\n", |