diff options
author | Laxman Dewangan <ldewangan@nvidia.com> | 2013-02-20 15:29:59 +0530 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2013-09-14 13:06:09 -0700 |
commit | 1590733b95f0bfa143c1d4d3c063aadfa9743b30 (patch) | |
tree | 7de7323c2b7ebed8f1a63f3009793655796f0d4f /kernel | |
parent | 51363a7755feda711605e009debd967df655729d (diff) |
time: alarmtimer: print cause of failure if suspend failed
Print/display the cause of error if suspend fails. This helps in
debugging the failure case.
(Cherrypicked commit
2a5cd5441333ffd1b8e72c2b0d70734b9ca5fdeb)
Reviewed-on: http://git-master/r/202454
Change-Id: I5fa1ea4a542d8ee8f8bdf106a97eefc2c5e3d8d3
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/215100
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/time/alarmtimer.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/time/alarmtimer.c b/kernel/time/alarmtimer.c index 1974cac05184..6b73d2ea3ed5 100644 --- a/kernel/time/alarmtimer.c +++ b/kernel/time/alarmtimer.c @@ -249,6 +249,8 @@ static int alarmtimer_suspend(struct device *dev) if (ktime_to_ns(min) < 2 * NSEC_PER_SEC) { __pm_wakeup_event(ws, 2 * MSEC_PER_SEC); + dev_err(dev, "RTC waketime %ll less than 2 sec\n", + ktime_to_ns(min)); return -EBUSY; } @@ -260,8 +262,10 @@ static int alarmtimer_suspend(struct device *dev) /* Set alarm, if in the past reject suspend briefly to handle */ ret = rtc_timer_start(rtc, &rtctimer, now, ktime_set(0, 0)); - if (ret < 0) + if (ret < 0) { + dev_err(dev, "rtc_timer_start failed: %d\n", ret); __pm_wakeup_event(ws, MSEC_PER_SEC); + } return ret; } #else |