diff options
| author | Tom Rini <trini@konsulko.com> | 2021-08-02 13:32:20 -0400 | 
|---|---|---|
| committer | Tom Rini <trini@konsulko.com> | 2021-08-02 13:32:20 -0400 | 
| commit | 51aef405550e603ff702c034f0e2cd0f15bdf2bb (patch) | |
| tree | 15216d11d6890cd497b6a97176c7aad4c4d63ecf /cmd/cros_ec.c | |
| parent | 73994c452fc5a960114360a651201ac48b135e81 (diff) | |
| parent | e6951139c0544116330b12e287fe45e30bbab11c (diff) | |
Merge branch '2021-08-02-numeric-input-cleanups'
- Merge in a series that cleans up and makes more consistent how we deal
  with numeric input on the CLI.  This saves a few bytes in a lot of
  places.
Diffstat (limited to 'cmd/cros_ec.c')
| -rw-r--r-- | cmd/cros_ec.c | 8 | 
1 files changed, 4 insertions, 4 deletions
| diff --git a/cmd/cros_ec.c b/cmd/cros_ec.c index eb5053d6424..a40f5898b52 100644 --- a/cmd/cros_ec.c +++ b/cmd/cros_ec.c @@ -65,11 +65,11 @@ static int do_read_write(struct udevice *dev, int is_write, int argc,  		return 1;  	if (argc < 4)  		return 1; -	addr = simple_strtoul(argv[3], &endp, 16); +	addr = hextoul(argv[3], &endp);  	if (*argv[3] == 0 || *endp != 0)  		return 1;  	if (argc > 4) { -		size = simple_strtoul(argv[4], &endp, 16); +		size = hextoul(argv[4], &endp);  		if (*argv[4] == 0 || *endp != 0)  			return 1;  	} @@ -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); | 
