aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/usb.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-07-24 09:03:30 -0600
committerTom Rini <trini@konsulko.com>2021-08-02 13:32:14 -0400
commit0b1284eb52578e15ec611adc5fee1a9ae68dadea (patch)
tree2d83815e93fc16decbaa5671fd660ade0ec74532 /cmd/usb.c
parent7e5f460ec457fe310156e399198a41eb0ce1e98c (diff)
downloadu-boot-0b1284eb52578e15ec611adc5fee1a9ae68dadea.tar.gz
global: Convert simple_strtoul() with decimal to dectoul()
It is a pain to have to specify the value 10 in each call. Add a new dectoul() function and update the code to use it. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'cmd/usb.c')
-rw-r--r--cmd/usb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd/usb.c b/cmd/usb.c
index b9ec29a8457..3d873765250 100644
--- a/cmd/usb.c
+++ b/cmd/usb.c
@@ -690,7 +690,7 @@ static int do_usb(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
* have multiple controllers and the device numbering
* starts at 1 on each bus.
*/
- i = simple_strtoul(argv[2], NULL, 10);
+ i = dectoul(argv[2], NULL);
printf("config for device %d\n", i);
udev = usb_find_device(i);
if (udev == NULL) {
@@ -706,13 +706,13 @@ static int do_usb(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
if (strncmp(argv[1], "test", 4) == 0) {
if (argc < 5)
return CMD_RET_USAGE;
- i = simple_strtoul(argv[2], NULL, 10);
+ i = dectoul(argv[2], NULL);
udev = usb_find_device(i);
if (udev == NULL) {
printf("Device %d does not exist.\n", i);
return 1;
}
- i = simple_strtoul(argv[3], NULL, 10);
+ i = dectoul(argv[3], NULL);
return usb_test(udev, i, argv[4]);
}
#ifdef CONFIG_USB_STORAGE