diff options
author | Mike Frysinger <vapier.adi@gmail.com> | 2008-08-05 16:01:20 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-08-05 17:33:48 -0400 |
commit | 140fab14aef093cedf87f69234474c04fdcec99c (patch) | |
tree | 6b7f39dfb95a8db26296e621292b4ff2783ab092 /drivers/rtc/rtc-bfin.c | |
parent | 3b128fe04a3087d6e974b87402dc6e75d3142186 (diff) |
blackfin RTC driver: wait for the write complete interrupt complete before sleeping
Since we use the write complete interrupt, wait for it
to complete before sleeping so we don't wake right back up due to it
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Cc: David Brownell <david-b@pacbell.net>
Cc: Alessandro Zummo <a.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/rtc/rtc-bfin.c')
-rw-r--r-- | drivers/rtc/rtc-bfin.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/rtc/rtc-bfin.c b/drivers/rtc/rtc-bfin.c index d53772f59ce5..e6b0470063e8 100644 --- a/drivers/rtc/rtc-bfin.c +++ b/drivers/rtc/rtc-bfin.c | |||
@@ -435,9 +435,10 @@ static int __devexit bfin_rtc_remove(struct platform_device *pdev) | |||
435 | #ifdef CONFIG_PM | 435 | #ifdef CONFIG_PM |
436 | static int bfin_rtc_suspend(struct platform_device *pdev, pm_message_t state) | 436 | static int bfin_rtc_suspend(struct platform_device *pdev, pm_message_t state) |
437 | { | 437 | { |
438 | if (device_may_wakeup(&pdev->dev)) | 438 | if (device_may_wakeup(&pdev->dev)) { |
439 | enable_irq_wake(IRQ_RTC); | 439 | enable_irq_wake(IRQ_RTC); |
440 | else | 440 | bfin_rtc_sync_pending(&pdev->dev); |
441 | } else | ||
441 | bfin_rtc_int_clear(-1); | 442 | bfin_rtc_int_clear(-1); |
442 | 443 | ||
443 | return 0; | 444 | return 0; |