Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 305238
b: refs/heads/master
c: 8c013d9
h: refs/heads/master
v: v3
  • Loading branch information
Paul Mundt committed May 10, 2012
1 parent 8814fa2 commit e5d7ac9
Show file tree
Hide file tree
Showing 2 changed files with 9 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: 9ea6404691a520f734b819cbbd4757b0ea5f99c6
refs/heads/master: 8c013d964ac32c20afe2cdeadf59926d87012b37
8 changes: 8 additions & 0 deletions trunk/drivers/watchdog/shwdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <linux/spinlock.h>
#include <linux/miscdevice.h>
#include <linux/watchdog.h>
#include <linux/pm_runtime.h>
#include <linux/fs.h>
#include <linux/mm.h>
#include <linux/slab.h>
Expand Down Expand Up @@ -87,6 +88,8 @@ static int sh_wdt_start(struct watchdog_device *wdt_dev)
unsigned long flags;
u8 csr;

pm_runtime_get_sync(wdt->dev);

spin_lock_irqsave(&wdt->lock, flags);

next_heartbeat = jiffies + (heartbeat * HZ);
Expand Down Expand Up @@ -137,6 +140,8 @@ static int sh_wdt_stop(struct watchdog_device *wdt_dev)

spin_unlock_irqrestore(&wdt->lock, flags);

pm_runtime_put_sync(wdt->dev);

return 0;
}

Expand Down Expand Up @@ -283,6 +288,8 @@ static int __devinit sh_wdt_probe(struct platform_device *pdev)

dev_info(&pdev->dev, "initialized.\n");

pm_runtime_enable(&pdev->dev);

return 0;

out_disable:
Expand All @@ -300,6 +307,7 @@ static int __devexit sh_wdt_remove(struct platform_device *pdev)

watchdog_unregister_device(&sh_wdt_dev);

pm_runtime_disable(&pdev->dev);
clk_disable(wdt->clk);
clk_put(wdt->clk);

Expand Down

0 comments on commit e5d7ac9

Please sign in to comment.