Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 261093
b: refs/heads/master
c: 641e4f4
h: refs/heads/master
i:
  261091: ec1c169
v: v3
  • Loading branch information
Peter Fordham authored and Wim Van Sebroeck committed Jul 22, 2011
1 parent 4cb71df commit ab7734b
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fad0a9dd0da2dc9971e0e71f41134c791f2030c2
refs/heads/master: 641e4f449512ced3a3b784b33ce191e664a6d2dd
23 changes: 23 additions & 0 deletions trunk/drivers/watchdog/mpcore_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -407,12 +407,35 @@ static int __devexit mpcore_wdt_remove(struct platform_device *dev)
return 0;
}

#ifdef CONFIG_PM
static int mpcore_wdt_suspend(struct platform_device *dev, pm_message_t msg)
{
struct mpcore_wdt *wdt = platform_get_drvdata(dev);
mpcore_wdt_stop(wdt); /* Turn the WDT off */
return 0;
}

static int mpcore_wdt_resume(struct platform_device *dev)
{
struct mpcore_wdt *wdt = platform_get_drvdata(dev);
/* re-activate timer */
if (test_bit(0, &wdt->timer_alive))
mpcore_wdt_start(wdt);
return 0;
}
#else
#define mpcore_wdt_suspend NULL
#define mpcore_wdt_resume NULL
#endif

/* work with hotplug and coldplug */
MODULE_ALIAS("platform:mpcore_wdt");

static struct platform_driver mpcore_wdt_driver = {
.probe = mpcore_wdt_probe,
.remove = __devexit_p(mpcore_wdt_remove),
.suspend = mpcore_wdt_suspend,
.resume = mpcore_wdt_resume,
.shutdown = mpcore_wdt_shutdown,
.driver = {
.owner = THIS_MODULE,
Expand Down

0 comments on commit ab7734b

Please sign in to comment.