]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - kernel/power/main.c
pm selftest: rtc paranoia
[linux-2.6-omap-h63xx.git] / kernel / power / main.c
index 95bff23ecdaae70e69d308baef69efb75a554b7f..0b7476f5d2a64fc848b88bfc51a06eb8d233eae1 100644 (file)
@@ -635,6 +635,13 @@ static void __init test_wakealarm(struct rtc_device *rtc, suspend_state_t state)
        }
        if (status < 0)
                printk(err_suspend, status);
+
+       /* Some platforms can't detect that the alarm triggered the
+        * wakeup, or (accordingly) disable it after it afterwards.
+        * It's supposed to give oneshot behavior; cope.
+        */
+       alm.enabled = false;
+       rtc_set_alarm(rtc, &alm);
 }
 
 static int __init has_wakealarm(struct device *dev, void *name_ptr)