aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc
diff options
context:
space:
mode:
authorChanghwan Youn <chaos.youn@samsung.com>2010-10-27 18:33:08 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-27 21:03:06 -0400
commitdd061d1abe4e637bf755865f776f8088dacd1c0b (patch)
tree8c4352b8bb061380a2ed537371c62ee786ea43e7 /drivers/rtc
parentf61ae6711d69717558e882a78487527705603a74 (diff)
rtc: rtc-s3c: fix setting missing field of getalarm
Current s3c_rtc_getalarm() sets missing field of alarm time with 0xff. But this value should be -1 according to drivers/rtc/interface.c. Signed-off-by: Changhwan Youn <chaos.youn@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com> Acked-by: Ben Dooks <ben-linux@fluff.org> Cc: Wan ZongShun <mcuos.com@gmail.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/rtc-s3c.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c
index a87982d7cb70..75b009a17e5b 100644
--- a/drivers/rtc/rtc-s3c.c
+++ b/drivers/rtc/rtc-s3c.c
@@ -242,34 +242,34 @@ static int s3c_rtc_getalarm(struct device *dev, struct rtc_wkalrm *alrm)
242 if (alm_en & S3C2410_RTCALM_SECEN) 242 if (alm_en & S3C2410_RTCALM_SECEN)
243 alm_tm->tm_sec = bcd2bin(alm_tm->tm_sec); 243 alm_tm->tm_sec = bcd2bin(alm_tm->tm_sec);
244 else 244 else
245 alm_tm->tm_sec = 0xff; 245 alm_tm->tm_sec = -1;
246 246
247 if (alm_en & S3C2410_RTCALM_MINEN) 247 if (alm_en & S3C2410_RTCALM_MINEN)
248 alm_tm->tm_min = bcd2bin(alm_tm->tm_min); 248 alm_tm->tm_min = bcd2bin(alm_tm->tm_min);
249 else 249 else
250 alm_tm->tm_min = 0xff; 250 alm_tm->tm_min = -1;
251 251
252 if (alm_en & S3C2410_RTCALM_HOUREN) 252 if (alm_en & S3C2410_RTCALM_HOUREN)
253 alm_tm->tm_hour = bcd2bin(alm_tm->tm_hour); 253 alm_tm->tm_hour = bcd2bin(alm_tm->tm_hour);
254 else 254 else
255 alm_tm->tm_hour = 0xff; 255 alm_tm->tm_hour = -1;
256 256
257 if (alm_en & S3C2410_RTCALM_DAYEN) 257 if (alm_en & S3C2410_RTCALM_DAYEN)
258 alm_tm->tm_mday = bcd2bin(alm_tm->tm_mday); 258 alm_tm->tm_mday = bcd2bin(alm_tm->tm_mday);
259 else 259 else
260 alm_tm->tm_mday = 0xff; 260 alm_tm->tm_mday = -1;
261 261
262 if (alm_en & S3C2410_RTCALM_MONEN) { 262 if (alm_en & S3C2410_RTCALM_MONEN) {
263 alm_tm->tm_mon = bcd2bin(alm_tm->tm_mon); 263 alm_tm->tm_mon = bcd2bin(alm_tm->tm_mon);
264 alm_tm->tm_mon -= 1; 264 alm_tm->tm_mon -= 1;
265 } else { 265 } else {
266 alm_tm->tm_mon = 0xff; 266 alm_tm->tm_mon = -1;
267 } 267 }
268 268
269 if (alm_en & S3C2410_RTCALM_YEAREN) 269 if (alm_en & S3C2410_RTCALM_YEAREN)
270 alm_tm->tm_year = bcd2bin(alm_tm->tm_year); 270 alm_tm->tm_year = bcd2bin(alm_tm->tm_year);
271 else 271 else
272 alm_tm->tm_year = 0xffff; 272 alm_tm->tm_year = -1;
273 273
274 return 0; 274 return 0;
275} 275}