aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-test.c
diff options
context:
space:
mode:
authorAlessandro Zummo <a.zummo@towertech.it>2009-01-06 17:42:21 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-06 18:59:25 -0500
commitbbccf83f6c4e1a0de5bdf51ec9ec708d3a1ce933 (patch)
tree8c9797c7914b0f7fc78e5878ef33ae5f3219a202 /drivers/rtc/rtc-test.c
parentf60091575d43e5a27b26f4d6fa4251cdd6b9ae8a (diff)
rtc: use set_mmss when set_time is not available
Drivers should only need to implement either set_mmss (counter based RTCs) or set_time (most RTCs). The RTC subsystem will handle them appropriately. Signed-off-by: Alessandro Zummo <a.zummo@towertech.it> Cc: Kumar Gala <galak@kernel.crashing.org> Cc: David Brownell <david-b@pacbell.net> Cc: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rtc/rtc-test.c')
-rw-r--r--drivers/rtc/rtc-test.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/rtc/rtc-test.c b/drivers/rtc/rtc-test.c
index bc930022004a..e478280ff628 100644
--- a/drivers/rtc/rtc-test.c
+++ b/drivers/rtc/rtc-test.c
@@ -34,14 +34,9 @@ static int test_rtc_read_time(struct device *dev,
34 return 0; 34 return 0;
35} 35}
36 36
37static int test_rtc_set_time(struct device *dev,
38 struct rtc_time *tm)
39{
40 return 0;
41}
42
43static int test_rtc_set_mmss(struct device *dev, unsigned long secs) 37static int test_rtc_set_mmss(struct device *dev, unsigned long secs)
44{ 38{
39 dev_info(dev, "%s, secs = %lu\n", __func__, secs);
45 return 0; 40 return 0;
46} 41}
47 42
@@ -78,7 +73,6 @@ static int test_rtc_ioctl(struct device *dev, unsigned int cmd,
78static const struct rtc_class_ops test_rtc_ops = { 73static const struct rtc_class_ops test_rtc_ops = {
79 .proc = test_rtc_proc, 74 .proc = test_rtc_proc,
80 .read_time = test_rtc_read_time, 75 .read_time = test_rtc_read_time,
81 .set_time = test_rtc_set_time,
82 .read_alarm = test_rtc_read_alarm, 76 .read_alarm = test_rtc_read_alarm,
83 .set_alarm = test_rtc_set_alarm, 77 .set_alarm = test_rtc_set_alarm,
84 .set_mmss = test_rtc_set_mmss, 78 .set_mmss = test_rtc_set_mmss,