From d1e2319414ea5218ba801163e4530ecf2dfcbf36 Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Mon, 1 Sep 2008 23:06:23 +0200 Subject: rtc: allow rtc_set to return an error and use it in cmd_date Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- drivers/rtc/pcf8563.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'drivers/rtc/pcf8563.c') diff --git a/drivers/rtc/pcf8563.c b/drivers/rtc/pcf8563.c index 1274ffa..2fe1e37 100644 --- a/drivers/rtc/pcf8563.c +++ b/drivers/rtc/pcf8563.c @@ -86,7 +86,7 @@ int rtc_get (struct rtc_time *tmp) return rel; } -void rtc_set (struct rtc_time *tmp) +int rtc_set (struct rtc_time *tmp) { uchar century; @@ -104,6 +104,8 @@ void rtc_set (struct rtc_time *tmp) rtc_write (0x04, bin2bcd(tmp->tm_hour)); rtc_write (0x03, bin2bcd(tmp->tm_min )); rtc_write (0x02, bin2bcd(tmp->tm_sec )); + + return 0; } void rtc_reset (void) -- cgit v1.1