]> git.sur5r.net Git - u-boot/blobdiff - rtc/rs5c372.c
rtc/: Augment CONFIG_COMMANDS tests with defined(CONFIG_CMD_*).
[u-boot] / rtc / rs5c372.c
index 0f8ec6224a3ae432140e1ccea7ae669c0964385b..6e1171024c774d0e8fc1bae8448ed9d325916cb6 100644 (file)
@@ -34,7 +34,7 @@
 #include <rtc.h>
 #include <i2c.h>
 
-#if defined(CONFIG_RTC_RS5C372A) && (CONFIG_COMMANDS & CFG_CMD_DATE)
+#if defined(CONFIG_RTC_RS5C372A) && ((CONFIG_COMMANDS & CFG_CMD_DATE) || defined(CONFIG_CMD_DATE))
 /*
  * Reads are always done starting with register 15, which requires some
  * jumping-through-hoops to access the data correctly.
@@ -73,7 +73,7 @@ static unsigned bcd2bin (uchar c);
 static int setup_done = 0;
 
 static int
-rs5c372_readram(char *buf, int len)
+rs5c372_readram(unsigned char *buf, int len)
 {
        int ret;
 
@@ -95,7 +95,6 @@ rs5c372_enable(void)
        unsigned char buf[RS5C372_RAM_SIZE + 1];
        int ret;
 
-
        /* note that this returns reg. 15 in buf[1] */
        ret = rs5c372_readram(&buf[1], RS5C372_RAM_SIZE);
        if (ret != 0) {
@@ -129,7 +128,7 @@ rs5c372_enable(void)
 }
 
 static void
-rs5c372_convert_to_time(struct rtc_time *dt, char *buf)
+rs5c372_convert_to_time(struct rtc_time *dt, unsigned char *buf)
 {
        /* buf[0] is register 15 */
        dt->tm_sec = bcd2bin(buf[1]);