summaryrefslogtreecommitdiff
path: root/drivers/rtc/ds3231.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2011-11-04 15:55:12 +0000
committerWolfgang Denk <wd@denx.de>2011-11-07 22:09:50 +0100
commit397b40caf2eacec576c72eb52144383f11ae7688 (patch)
tree90a87a07485de14df27a619c962c70a1d1246a1f /drivers/rtc/ds3231.c
parent55b97886f805b9c5283fd926a873979a16131d86 (diff)
downloadu-boot-imx-397b40caf2eacec576c72eb52144383f11ae7688.zip
u-boot-imx-397b40caf2eacec576c72eb52144383f11ae7688.tar.gz
u-boot-imx-397b40caf2eacec576c72eb52144383f11ae7688.tar.bz2
drivers/rtc/ds3231.c: fix GCC 4.6 build warnings
Fix: ds3231.c: In function 'rtc_get': ds3231.c:90:52: warning: variable 'control' set but not used [-Wunused-but-set-variable] Fix is done by switching to standard debug() instead of custom macro. Signed-off-by: Wolfgang Denk <wd@denx.de>
Diffstat (limited to 'drivers/rtc/ds3231.c')
-rw-r--r--drivers/rtc/ds3231.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/drivers/rtc/ds3231.c b/drivers/rtc/ds3231.c
index 134a0e4..ae59cfb 100644
--- a/drivers/rtc/ds3231.c
+++ b/drivers/rtc/ds3231.c
@@ -35,16 +35,6 @@
#if defined(CONFIG_CMD_DATE)
-/*---------------------------------------------------------------------*/
-#undef DEBUG_RTC
-
-#ifdef DEBUG_RTC
-#define DEBUGR(fmt,args...) printf(fmt ,##args)
-#else
-#define DEBUGR(fmt,args...)
-#endif
-/*---------------------------------------------------------------------*/
-
/*
* RTC register addresses
*/
@@ -99,7 +89,7 @@ int rtc_get (struct rtc_time *tmp)
mon_cent = rtc_read (RTC_MON_REG_ADDR);
year = rtc_read (RTC_YR_REG_ADDR);
- DEBUGR ("Get RTC year: %02x mon/cent: %02x mday: %02x wday: %02x "
+ debug("Get RTC year: %02x mon/cent: %02x mday: %02x wday: %02x "
"hr: %02x min: %02x sec: %02x control: %02x status: %02x\n",
year, mon_cent, mday, wday, hour, min, sec, control, status);
@@ -121,7 +111,7 @@ int rtc_get (struct rtc_time *tmp)
tmp->tm_yday = 0;
tmp->tm_isdst= 0;
- DEBUGR ("Get DATE: %4d-%02d-%02d (wday=%d) TIME: %2d:%02d:%02d\n",
+ debug("Get DATE: %4d-%02d-%02d (wday=%d) TIME: %2d:%02d:%02d\n",
tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday,
tmp->tm_hour, tmp->tm_min, tmp->tm_sec);
@@ -136,7 +126,7 @@ int rtc_set (struct rtc_time *tmp)
{
uchar century;
- DEBUGR ("Set DATE: %4d-%02d-%02d (wday=%d) TIME: %2d:%02d:%02d\n",
+ debug("Set DATE: %4d-%02d-%02d (wday=%d) TIME: %2d:%02d:%02d\n",
tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday,
tmp->tm_hour, tmp->tm_min, tmp->tm_sec);