Skip to content

Commit

Permalink
blackfin RTC driver: wait for the write complete interrupt complete b…
Browse files Browse the repository at this point in the history
…efore 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>
  • Loading branch information
Mike Frysinger authored and Linus Torvalds committed Aug 5, 2008
1 parent 3b128fe commit 140fab1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/rtc/rtc-bfin.c
Original file line number Diff line number Diff line change
Expand Up @@ -435,9 +435,10 @@ static int __devexit bfin_rtc_remove(struct platform_device *pdev)
#ifdef CONFIG_PM
static int bfin_rtc_suspend(struct platform_device *pdev, pm_message_t state)
{
if (device_may_wakeup(&pdev->dev))
if (device_may_wakeup(&pdev->dev)) {
enable_irq_wake(IRQ_RTC);
else
bfin_rtc_sync_pending(&pdev->dev);
} else
bfin_rtc_int_clear(-1);

return 0;
Expand Down

0 comments on commit 140fab1

Please sign in to comment.