diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-06 19:35:10 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-06 19:35:10 -0400 |
commit | 57d326169e878a1a37b2bccd1cf81f6809ee67b9 (patch) | |
tree | 86ed74ae4dc2beaebce1c67b8459f1873b777d3a /drivers/rtc/interface.c | |
parent | 7b215de3d0abbc4f6daf2efd19e8809af0564490 (diff) | |
parent | 0244756edc4b98c129e92c7061d9f383708cf786 (diff) |
Merge branch 'akpm' (patches from Andrew Morton) into next
Merge more updates from Andrew Morton:
- Most of the rest of MM.
This includes "mark remap_file_pages syscall as deprecated" but the
actual "replace remap_file_pages syscall with emulation" is held
back. I guess we'll need to work out when to pull the trigger on
that one.
- various minor cleanups to obscure filesystems
- the drivers/rtc queue
- hfsplus updates
- ufs, hpfs, fatfs, affs, reiserfs
- Documentation/
- signals
- procfs
- cpu hotplug
- lib/idr.c
- rapidio
- sysctl
- ipc updates
* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (171 commits)
ufs: sb mutex merge + mutex_destroy
powerpc: update comments for generic idle conversion
cris: update comments for generic idle conversion
idle: remove cpu_idle() forward declarations
nbd: zero from and len fields in NBD_CMD_DISCONNECT.
mm: convert some level-less printks to pr_*
MAINTAINERS: adi-buildroot-devel is moderated
MAINTAINERS: add linux-api for review of API/ABI changes
mm/kmemleak-test.c: use pr_fmt for logging
fs/dlm/debug_fs.c: replace seq_printf by seq_puts
fs/dlm/lockspace.c: convert simple_str to kstr
fs/dlm/config.c: convert simple_str to kstr
mm: mark remap_file_pages() syscall as deprecated
mm: memcontrol: remove unnecessary memcg argument from soft limit functions
mm: memcontrol: clean up memcg zoneinfo lookup
mm/memblock.c: call kmemleak directly from memblock_(alloc|free)
mm/mempool.c: update the kmemleak stack trace for mempool allocations
lib/radix-tree.c: update the kmemleak stack trace for radix tree allocations
mm: introduce kmemleak_update_trace()
mm/kmemleak.c: use %u to print ->checksum
...
Diffstat (limited to 'drivers/rtc/interface.c')
-rw-r--r-- | drivers/rtc/interface.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c index c2eff6082363..5813fa52c3d4 100644 --- a/drivers/rtc/interface.c +++ b/drivers/rtc/interface.c | |||
@@ -292,7 +292,8 @@ int __rtc_read_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm) | |||
292 | dev_dbg(&rtc->dev, "alarm rollover: %s\n", "year"); | 292 | dev_dbg(&rtc->dev, "alarm rollover: %s\n", "year"); |
293 | do { | 293 | do { |
294 | alarm->time.tm_year++; | 294 | alarm->time.tm_year++; |
295 | } while (rtc_valid_tm(&alarm->time) != 0); | 295 | } while (!is_leap_year(alarm->time.tm_year + 1900) |
296 | && rtc_valid_tm(&alarm->time) != 0); | ||
296 | break; | 297 | break; |
297 | 298 | ||
298 | default: | 299 | default: |
@@ -300,7 +301,16 @@ int __rtc_read_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm) | |||
300 | } | 301 | } |
301 | 302 | ||
302 | done: | 303 | done: |
303 | return 0; | 304 | err = rtc_valid_tm(&alarm->time); |
305 | |||
306 | if (err) { | ||
307 | dev_warn(&rtc->dev, "invalid alarm value: %d-%d-%d %d:%d:%d\n", | ||
308 | alarm->time.tm_year + 1900, alarm->time.tm_mon + 1, | ||
309 | alarm->time.tm_mday, alarm->time.tm_hour, alarm->time.tm_min, | ||
310 | alarm->time.tm_sec); | ||
311 | } | ||
312 | |||
313 | return err; | ||
304 | } | 314 | } |
305 | 315 | ||
306 | int rtc_read_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm) | 316 | int rtc_read_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm) |