rtc: allow rtc_set to return an error and use it in cmd_date
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
diff --git a/drivers/rtc/ds164x.c b/drivers/rtc/ds164x.c
index c621a9e..00494b3 100644
--- a/drivers/rtc/ds164x.c
+++ b/drivers/rtc/ds164x.c
@@ -119,7 +119,7 @@
return 0;
}
-void rtc_set( struct rtc_time *tmp )
+int rtc_set( struct rtc_time *tmp )
{
uchar reg_a;
@@ -145,6 +145,8 @@
/* unlock clock registers after read */
rtc_write( RTC_CONTROLA, ( reg_a & ~RTC_CA_WRITE ));
+
+ return 0;
}
void rtc_reset (void)