summaryrefslogtreecommitdiff
path: root/drivers/char
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2005-04-30 12:19:28 +0100
committerRussell King <rmk@dyn-67.arm.linux.org.uk>2005-04-30 12:19:28 +0100
commitd5aa207e46ff7ee838683a7d95ecf46fe42a9a56 (patch)
tree2fe7cf50bb45a3ca94f095695bab5414fa56c1f3 /drivers/char
parenta6ad57fb4b5e9d68553f4440377b99f75588fa88 (diff)
[PATCH] ARM: RTC: allow driver methods to return error
Allow RTC drivers to return error codes from their read_time or read_alarm methods. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/s3c2410-rtc.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/char/s3c2410-rtc.c b/drivers/char/s3c2410-rtc.c
index 8e61be34a1d3..ed867db550a9 100644
--- a/drivers/char/s3c2410-rtc.c
+++ b/drivers/char/s3c2410-rtc.c
@@ -116,7 +116,7 @@ static void s3c2410_rtc_setfreq(int freq)
/* Time read/write */
-static void s3c2410_rtc_gettime(struct rtc_time *rtc_tm)
+static int s3c2410_rtc_gettime(struct rtc_time *rtc_tm)
{
unsigned int have_retried = 0;
@@ -151,6 +151,8 @@ static void s3c2410_rtc_gettime(struct rtc_time *rtc_tm)
rtc_tm->tm_year += 100;
rtc_tm->tm_mon -= 1;
+
+ return 0;
}
@@ -171,7 +173,7 @@ static int s3c2410_rtc_settime(struct rtc_time *tm)
return 0;
}
-static void s3c2410_rtc_getalarm(struct rtc_wkalrm *alrm)
+static int s3c2410_rtc_getalarm(struct rtc_wkalrm *alrm)
{
struct rtc_time *alm_tm = &alrm->time;
unsigned int alm_en;
@@ -231,6 +233,8 @@ static void s3c2410_rtc_getalarm(struct rtc_wkalrm *alrm)
}
/* todo - set alrm->enabled ? */
+
+ return 0;
}
static int s3c2410_rtc_setalarm(struct rtc_wkalrm *alrm)