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>
This commit is contained in:
@@ -93,7 +93,7 @@ int do_led(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||
if (cmd == LEDST_BLINK) {
|
||||
if (argc < 4)
|
||||
return CMD_RET_USAGE;
|
||||
freq_ms = simple_strtoul(argv[3], NULL, 10);
|
||||
freq_ms = dectoul(argv[3], NULL);
|
||||
}
|
||||
#endif
|
||||
ret = led_get_by_label(led_label, &dev);
|
||||
|
||||
Reference in New Issue
Block a user