Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 315959
b: refs/heads/master
c: 41814ee
h: refs/heads/master
i:
  315957: 0b73372
  315955: 5e88771
  315951: 8f6312f
v: v3
  • Loading branch information
Lokesh Vutla authored and Wim Van Sebroeck committed Jul 23, 2012
1 parent 61b2785 commit 38a3384
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 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: 0402450f45673d3c03340cb1e679bf2a1fc0abee
refs/heads/master: 41814eed414ab3cef3d2b857ae3690a2b4888291
17 changes: 0 additions & 17 deletions trunk/drivers/watchdog/omap_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,17 +126,13 @@ static void omap_wdt_set_timeout(struct omap_wdt_dev *wdev)
u32 pre_margin = GET_WLDR_VAL(timer_margin);
void __iomem *base = wdev->base;

pm_runtime_get_sync(wdev->dev);

/* just count up at 32 KHz */
while (__raw_readl(base + OMAP_WATCHDOG_WPS) & 0x04)
cpu_relax();

__raw_writel(pre_margin, base + OMAP_WATCHDOG_LDR);
while (__raw_readl(base + OMAP_WATCHDOG_WPS) & 0x04)
cpu_relax();

pm_runtime_put_sync(wdev->dev);
}

/*
Expand Down Expand Up @@ -166,8 +162,6 @@ static int omap_wdt_open(struct inode *inode, struct file *file)
omap_wdt_ping(wdev); /* trigger loading of new timeout value */
omap_wdt_enable(wdev);

pm_runtime_put_sync(wdev->dev);

return nonseekable_open(inode, file);
}

Expand All @@ -179,8 +173,6 @@ static int omap_wdt_release(struct inode *inode, struct file *file)
* Shut off the timer unless NOWAYOUT is defined.
*/
#ifndef CONFIG_WATCHDOG_NOWAYOUT
pm_runtime_get_sync(wdev->dev);

omap_wdt_disable(wdev);

pm_runtime_put_sync(wdev->dev);
Expand All @@ -199,11 +191,9 @@ static ssize_t omap_wdt_write(struct file *file, const char __user *data,

/* Refresh LOAD_TIME. */
if (len) {
pm_runtime_get_sync(wdev->dev);
spin_lock(&wdt_lock);
omap_wdt_ping(wdev);
spin_unlock(&wdt_lock);
pm_runtime_put_sync(wdev->dev);
}
return len;
}
Expand Down Expand Up @@ -236,26 +226,22 @@ static long omap_wdt_ioctl(struct file *file, unsigned int cmd,
(int __user *)arg);
return put_user(0, (int __user *)arg);
case WDIOC_KEEPALIVE:
pm_runtime_get_sync(wdev->dev);
spin_lock(&wdt_lock);
omap_wdt_ping(wdev);
spin_unlock(&wdt_lock);
pm_runtime_put_sync(wdev->dev);
return 0;
case WDIOC_SETTIMEOUT:
if (get_user(new_margin, (int __user *)arg))
return -EFAULT;
omap_wdt_adjust_timeout(new_margin);

pm_runtime_get_sync(wdev->dev);
spin_lock(&wdt_lock);
omap_wdt_disable(wdev);
omap_wdt_set_timeout(wdev);
omap_wdt_enable(wdev);

omap_wdt_ping(wdev);
spin_unlock(&wdt_lock);
pm_runtime_put_sync(wdev->dev);
/* Fall */
case WDIOC_GETTIMEOUT:
return put_user(timer_margin, (int __user *)arg);
Expand Down Expand Up @@ -363,7 +349,6 @@ static void omap_wdt_shutdown(struct platform_device *pdev)
struct omap_wdt_dev *wdev = platform_get_drvdata(pdev);

if (wdev->omap_wdt_users) {
pm_runtime_get_sync(wdev->dev);
omap_wdt_disable(wdev);
pm_runtime_put_sync(wdev->dev);
}
Expand Down Expand Up @@ -403,7 +388,6 @@ static int omap_wdt_suspend(struct platform_device *pdev, pm_message_t state)
struct omap_wdt_dev *wdev = platform_get_drvdata(pdev);

if (wdev->omap_wdt_users) {
pm_runtime_get_sync(wdev->dev);
omap_wdt_disable(wdev);
pm_runtime_put_sync(wdev->dev);
}
Expand All @@ -419,7 +403,6 @@ static int omap_wdt_resume(struct platform_device *pdev)
pm_runtime_get_sync(wdev->dev);
omap_wdt_enable(wdev);
omap_wdt_ping(wdev);
pm_runtime_put_sync(wdev->dev);
}

return 0;
Expand Down

0 comments on commit 38a3384

Please sign in to comment.