global: Convert simple_strtoul() with hex to hextoul()
It is a pain to have to specify the value 16 in each call. Add a new
hextoul() function and update the code to use it.
Add a proper comment to simple_strtoul() while we are here.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/cmd/mdio.c b/cmd/mdio.c
index cfa45ad..3c74326 100644
--- a/cmd/mdio.c
+++ b/cmd/mdio.c
@@ -254,7 +254,7 @@
switch (op[0]) {
case 'w':
if (pos > 1)
- data = simple_strtoul(argv[pos--], NULL, 16);
+ data = hextoul(argv[pos--], NULL);
/* Intentional fall-through - Get reg for read and write */
case 'r':
if (pos > 1)