aboutsummaryrefslogtreecommitdiff
path: root/cmd/cros_ec.c
diff options
context:
space:
mode:
authorSimon Glass2021-07-24 09:03:30 -0600
committerTom Rini2021-08-02 13:32:14 -0400
commit0b1284eb52578e15ec611adc5fee1a9ae68dadea (patch)
tree2d83815e93fc16decbaa5671fd660ade0ec74532 /cmd/cros_ec.c
parent7e5f460ec457fe310156e399198a41eb0ce1e98c (diff)
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/cros_ec.c')
-rw-r--r--cmd/cros_ec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/cros_ec.c b/cmd/cros_ec.c
index abda5d6cd23..a40f5898b52 100644
--- a/cmd/cros_ec.c
+++ b/cmd/cros_ec.c
@@ -501,11 +501,11 @@ static int do_cros_ec(struct cmd_tbl *cmdtp, int flag, int argc,
if (argc < 3)
return CMD_RET_USAGE;
- index = simple_strtoul(argv[2], &endp, 10);
+ index = dectoul(argv[2], &endp);
if (*argv[2] == 0 || *endp != 0)
return CMD_RET_USAGE;
if (argc > 3) {
- state = simple_strtoul(argv[3], &endp, 10);
+ state = dectoul(argv[3], &endp);
if (*argv[3] == 0 || *endp != 0)
return CMD_RET_USAGE;
ret = cros_ec_set_ldo(dev, index, state);