]> Git Repo - u-boot.git/blobdiff - board/gdsys/common/osd.c
global: Convert simple_strtoul() with hex to hextoul()
[u-boot.git] / board / gdsys / common / osd.c
index 679f8f30191b9fad7c29a31285b700e0b7d4648b..dc548efbc7a43afda789cbcdecd6c3b890bc87bf 100644 (file)
@@ -284,9 +284,9 @@ static int osd_print(struct cmd_tbl *cmdtp, int flag, int argc,
                if (!(osd_screen_mask & (1 << screen)))
                        continue;
 
-               x = simple_strtoul(argv[1], NULL, 16);
-               y = simple_strtoul(argv[2], NULL, 16);
-               color = simple_strtoul(argv[3], NULL, 16);
+               x = hextoul(argv[1], NULL);
+               y = hextoul(argv[2], NULL);
+               color = hextoul(argv[3], NULL);
                text = argv[4];
                charcount = strlen(text);
                len = (charcount > bufsize) ? bufsize : charcount;
@@ -416,13 +416,13 @@ int osd_write(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
                char *rp;
                u16 *wp = buffer;
                unsigned count = (argc > 4) ?
-                       simple_strtoul(argv[4], NULL, 16) : 1;
+                       hextoul(argv[4], NULL) : 1;
 
                if (!(osd_screen_mask & (1 << screen)))
                        continue;
 
-               x = simple_strtoul(argv[1], NULL, 16);
-               y = simple_strtoul(argv[2], NULL, 16);
+               x = hextoul(argv[1], NULL);
+               y = hextoul(argv[2], NULL);
                rp = argv[3];
 
 
@@ -431,7 +431,7 @@ int osd_write(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 
                        memcpy(substr, rp, 4);
                        substr[4] = 0;
-                       *wp = simple_strtoul(substr, NULL, 16);
+                       *wp = hextoul(substr, NULL);
 
                        rp += 4;
                        wp++;
@@ -463,8 +463,8 @@ int osd_size(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
                return 1;
        }
 
-       x = simple_strtoul(argv[1], NULL, 16);
-       y = simple_strtoul(argv[2], NULL, 16);
+       x = hextoul(argv[1], NULL);
+       y = hextoul(argv[2], NULL);
 
        if (!x || (x > 64) || (x > MAX_X_CHARS) ||
            !y || (y > 32) || (y > MAX_Y_CHARS)) {
This page took 0.027451 seconds and 4 git commands to generate.