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/board/amlogic/vim3/vim3.c b/board/amlogic/vim3/vim3.c
index 18ef146..5d9ac64 100644
--- a/board/amlogic/vim3/vim3.c
+++ b/board/amlogic/vim3/vim3.c
@@ -166,7 +166,7 @@
tmp[0] = efuse_mac_addr[i * 2];
tmp[1] = efuse_mac_addr[i * 2 + 1];
tmp[2] = '\0';
- mac_addr[i] = simple_strtoul(tmp, NULL, 16);
+ mac_addr[i] = hextoul(tmp, NULL);
}
if (is_valid_ethaddr(mac_addr))