strmhz: Make hz unsigned to support greater than 2146 MHz clock
authorEd Swarthout <Ed.Swarthout@freescale.com>
Sat, 5 Mar 2011 16:28:17 +0000 (10:28 -0600)
committerWolfgang Denk <wd@denx.de>
Tue, 22 Mar 2011 22:34:36 +0000 (23:34 +0100)
For example, an input of 0x80000000 should print:

2147.484 instead of -2147.-483.

Signed-off-by: Ed Swarthout <Ed.Swarthout@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
include/common.h
lib/strmhz.c

index d8c912d09225eef098d39aa99dc4756536c0079a..893af5cc10eaf011466901a754c1440262dfe29b 100644 (file)
@@ -648,7 +648,7 @@ int sprintf(char * buf, const char *fmt, ...)
 int    vsprintf(char *buf, const char *fmt, va_list args);
 
 /* lib/strmhz.c */
-char * strmhz(char *buf, long hz);
+char * strmhz(char *buf, unsigned long hz);
 
 /* lib/crc32.c */
 #include <u-boot/crc.h>
index d6da1d136eef49c4207127672e0c577f74ae8f47..89f2263aee20ebad1628569cd39a70a77a50a271 100644 (file)
@@ -22,7 +22,7 @@
  */
 #include <common.h>
 
-char *strmhz (char *buf, long hz)
+char *strmhz (char *buf, unsigned long hz)
 {
        long l, n;
        long m;