diff options
author | Mike Frysinger <michael.frysinger@analog.com> | 2008-02-06 04:38:49 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-06 13:41:14 -0500 |
commit | 68db30472df36671cc397654c42802c93ef19f19 (patch) | |
tree | acf4dee10353139203484ed18906dbc6287f8382 /drivers | |
parent | 5438de442230c52d503d17943926520ee9a2eeee (diff) |
Blackfin RTC driver: read_alarm() checks the enabled field, not the pending field.
also, dont bother using memcpy since we can just do an assignment of the same structure.
Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Acked-by: Alessandro Zummo <alessandro.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')
-rw-r--r-- | drivers/rtc/rtc-bfin.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/rtc/rtc-bfin.c b/drivers/rtc/rtc-bfin.c index b14a9c46f3b2..a4ed2f82a09b 100644 --- a/drivers/rtc/rtc-bfin.c +++ b/drivers/rtc/rtc-bfin.c | |||
@@ -326,7 +326,7 @@ static int bfin_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm) | |||
326 | struct bfin_rtc *rtc = dev_get_drvdata(dev); | 326 | struct bfin_rtc *rtc = dev_get_drvdata(dev); |
327 | dev_dbg_stamp(dev); | 327 | dev_dbg_stamp(dev); |
328 | memcpy(&alrm->time, &rtc->rtc_alarm, sizeof(struct rtc_time)); | 328 | memcpy(&alrm->time, &rtc->rtc_alarm, sizeof(struct rtc_time)); |
329 | alrm->pending = !!(bfin_read_RTC_ICTL() & (RTC_ISTAT_ALARM | RTC_ISTAT_ALARM_DAY)); | 329 | alrm->enabled = !!(bfin_read_RTC_ICTL() & (RTC_ISTAT_ALARM | RTC_ISTAT_ALARM_DAY)); |
330 | return 0; | 330 | return 0; |
331 | } | 331 | } |
332 | 332 | ||
@@ -334,7 +334,7 @@ static int bfin_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm) | |||
334 | { | 334 | { |
335 | struct bfin_rtc *rtc = dev_get_drvdata(dev); | 335 | struct bfin_rtc *rtc = dev_get_drvdata(dev); |
336 | dev_dbg_stamp(dev); | 336 | dev_dbg_stamp(dev); |
337 | memcpy(&rtc->rtc_alarm, &alrm->time, sizeof(struct rtc_time)); | 337 | rtc->rtc_alarm = alrm->time; |
338 | return 0; | 338 | return 0; |
339 | } | 339 | } |
340 | 340 | ||