Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 166102
b: refs/heads/master
c: 5d027cd
h: refs/heads/master
v: v3
  • Loading branch information
Haojian Zhuang authored and Eric Miao committed Sep 10, 2009
1 parent e86503e commit 0307d3a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e6e698a4fb3cbeef9f478f9f165998246d9b1b0b
refs/heads/master: 5d027cd222a052923a511ba693b60e512b3866f2
23 changes: 13 additions & 10 deletions trunk/drivers/rtc/rtc-sa1100.c
Original file line number Diff line number Diff line change
Expand Up @@ -393,31 +393,34 @@ static int sa1100_rtc_remove(struct platform_device *pdev)
}

#ifdef CONFIG_PM
static int sa1100_rtc_suspend(struct platform_device *pdev, pm_message_t state)
static int sa1100_rtc_suspend(struct device *dev)
{
if (device_may_wakeup(&pdev->dev))
if (device_may_wakeup(dev))
enable_irq_wake(IRQ_RTCAlrm);
return 0;
}

static int sa1100_rtc_resume(struct platform_device *pdev)
static int sa1100_rtc_resume(struct device *dev)
{
if (device_may_wakeup(&pdev->dev))
if (device_may_wakeup(dev))
disable_irq_wake(IRQ_RTCAlrm);
return 0;
}
#else
#define sa1100_rtc_suspend NULL
#define sa1100_rtc_resume NULL

static struct dev_pm_ops sa1100_rtc_pm_ops = {
.suspend = sa1100_rtc_suspend,
.resume = sa1100_rtc_resume,
};
#endif

static struct platform_driver sa1100_rtc_driver = {
.probe = sa1100_rtc_probe,
.remove = sa1100_rtc_remove,
.suspend = sa1100_rtc_suspend,
.resume = sa1100_rtc_resume,
.driver = {
.name = "sa1100-rtc",
.name = "sa1100-rtc",
#ifdef CONFIG_PM
.pm = &sa1100_rtc_pm_ops,
#endif
},
};

Expand Down

0 comments on commit 0307d3a

Please sign in to comment.