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/drivers/rtc/m41t60.c b/drivers/rtc/m41t60.c
index 692042b..b8ad33e 100644
--- a/drivers/rtc/m41t60.c
+++ b/drivers/rtc/m41t60.c
@@ -214,7 +214,7 @@
* the M41T60 documentation for further details.
*/
if (s) {
- unsigned long const l = simple_strtoul(s, 0, 16);
+ unsigned long const l = hextoul(s, 0);
if (l <= 0x3F) {
if ((data[RTC_CTRL] & 0x3F) != l) {