aboutsummaryrefslogtreecommitdiff
path: root/cmd/osd.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/osd.c
parent7e5f460ec457fe310156e399198a41eb0ce1e98c (diff)
downloadu-boot-0b1284eb52578e15ec611adc5fee1a9ae68dadea.zip
u-boot-0b1284eb52578e15ec611adc5fee1a9ae68dadea.tar.gz
u-boot-0b1284eb52578e15ec611adc5fee1a9ae68dadea.tar.bz2
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/osd.c')
-rw-r--r--cmd/osd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/osd.c b/cmd/osd.c
index 8557894..c8c62d4 100644
--- a/cmd/osd.c
+++ b/cmd/osd.c
@@ -211,7 +211,7 @@ static int do_show_osd(struct cmd_tbl *cmdtp, int flag, int argc,
int i, res;
/* show specific OSD */
- i = simple_strtoul(argv[1], NULL, 10);
+ i = dectoul(argv[1], NULL);
res = uclass_get_device_by_seq(UCLASS_VIDEO_OSD, i, &osd);
if (res) {
@@ -240,7 +240,7 @@ static int do_osd_num(struct cmd_tbl *cmdtp, int flag, int argc,
osd_no = -1;
printf("Current osd is %d\n", osd_no);
} else {
- osd_no = simple_strtoul(argv[1], NULL, 10);
+ osd_no = dectoul(argv[1], NULL);
printf("Setting osd to %d\n", osd_no);
res = cmd_osd_set_osd_num(osd_no);