From: Kukjin Kim <kgene.kim@samsung.com>
To: linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org, rtc-linux@googlegroups.com
Cc: ben-linux@fluff.org, p_gortmaker@yahoo.com, a.zummo@towertech.it,
Changhwan Youn <chaos.youn@samsung.com>,
Kukjin Kim <kgene.kim@samsung.com>
Subject: [PATCH 2/5] rtc: rtc-s3c: Fix setting missing field of getalarm
Date: Tue, 7 Sep 2010 14:29:38 +0900 [thread overview]
Message-ID: <1283837381-9575-3-git-send-email-kgene.kim@samsung.com> (raw)
In-Reply-To: <1283837381-9575-1-git-send-email-kgene.kim@samsung.com>
From: Changhwan Youn <chaos.youn@samsung.com>
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>
Cc: Ben Dooks <ben-linux@fluff.org>
---
drivers/rtc/rtc-s3c.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c
index 557a538..e9eb0a0 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)
if (alm_en & S3C2410_RTCALM_SECEN)
alm_tm->tm_sec = bcd2bin(alm_tm->tm_sec);
else
- alm_tm->tm_sec = 0xff;
+ alm_tm->tm_sec = -1;
if (alm_en & S3C2410_RTCALM_MINEN)
alm_tm->tm_min = bcd2bin(alm_tm->tm_min);
else
- alm_tm->tm_min = 0xff;
+ alm_tm->tm_min = -1;
if (alm_en & S3C2410_RTCALM_HOUREN)
alm_tm->tm_hour = bcd2bin(alm_tm->tm_hour);
else
- alm_tm->tm_hour = 0xff;
+ alm_tm->tm_hour = -1;
if (alm_en & S3C2410_RTCALM_DAYEN)
alm_tm->tm_mday = bcd2bin(alm_tm->tm_mday);
else
- alm_tm->tm_mday = 0xff;
+ alm_tm->tm_mday = -1;
if (alm_en & S3C2410_RTCALM_MONEN) {
alm_tm->tm_mon = bcd2bin(alm_tm->tm_mon);
alm_tm->tm_mon -= 1;
} else {
- alm_tm->tm_mon = 0xff;
+ alm_tm->tm_mon = -1;
}
if (alm_en & S3C2410_RTCALM_YEAREN)
alm_tm->tm_year = bcd2bin(alm_tm->tm_year);
else
- alm_tm->tm_year = 0xffff;
+ alm_tm->tm_year = -1;
return 0;
}
--
1.6.2.5
next prev parent reply other threads:[~2010-09-07 5:46 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-07 5:29 [PATCH 0/5] rtc: rtc-s3c: Fix RTC bugs for RTC-S3C Kukjin Kim
2010-09-07 5:29 ` [PATCH 1/5] rtc: rtc-s3c: Fix access unit from byte to word on RTCCON Kukjin Kim
2010-09-07 23:17 ` Ben Dooks
2010-09-07 5:29 ` Kukjin Kim [this message]
2010-09-07 23:21 ` [PATCH 2/5] rtc: rtc-s3c: Fix setting missing field of getalarm Ben Dooks
2010-09-07 5:29 ` [PATCH 3/5] rtc: rtc-s3c: Fix on support RTC Alarm Kukjin Kim
2010-09-07 23:22 ` Ben Dooks
2010-09-07 5:29 ` [PATCH 4/5] rtc: rtc-s3c: Fix on RTC initialization method Kukjin Kim
2010-09-07 8:56 ` Kyungmin Park
2010-09-07 23:24 ` Ben Dooks
2010-09-08 1:55 ` Wan ZongShun
2010-09-09 1:03 ` Kukjin Kim
2010-09-09 1:04 ` Kukjin Kim
2010-09-07 5:29 ` [PATCH 5/5] rtc: rtc-s3c: Fix debug message format on RTC Kukjin Kim
2010-09-07 23:29 ` Ben Dooks
2010-09-09 1:11 ` Kukjin Kim
2010-09-10 9:05 ` [rtc-linux] " Wan ZongShun
2010-09-10 11:38 ` Kukjin Kim
2010-09-10 23:23 ` Andrew Morton
2010-09-10 23:35 ` Kukjin Kim
2010-10-07 23:16 ` Kukjin Kim
2010-10-07 23:28 ` Andrew Morton
2010-10-07 23:46 ` Kukjin Kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1283837381-9575-3-git-send-email-kgene.kim@samsung.com \
--to=kgene.kim@samsung.com \
--cc=a.zummo@towertech.it \
--cc=ben-linux@fluff.org \
--cc=chaos.youn@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=p_gortmaker@yahoo.com \
--cc=rtc-linux@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox