Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 173516
b: refs/heads/master
c: a65d0d7
h: refs/heads/master
v: v3
  • Loading branch information
Magnus Damm authored and Paul Mundt committed Dec 4, 2009
1 parent c783f61 commit 79c83b9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 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: 1c2e36cc9bbd60b8ba1eaa0768da57cf7f7cc570
refs/heads/master: a65d0d79c49ca6e220f770e49416e924fd9ecaec
17 changes: 11 additions & 6 deletions trunk/arch/sh/kernel/cpu/shmobile/pm_runtime.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,14 @@ static int __platform_pm_runtime_resume(struct platform_device *pdev)

dev_dbg(d, "__platform_pm_runtime_resume() [%d]\n", hwblk);

if (d->driver && d->driver->pm && d->driver->pm->runtime_resume) {
if (d->driver) {
hwblk_enable(hwblk_info, hwblk);
ret = 0;

if (test_bit(PDEV_ARCHDATA_FLAG_SUSP, &ad->flags)) {
ret = d->driver->pm->runtime_resume(d);
if (d->driver->pm && d->driver->pm->runtime_resume)
ret = d->driver->pm->runtime_resume(d);

if (!ret)
clear_bit(PDEV_ARCHDATA_FLAG_SUSP, &ad->flags);
else
Expand All @@ -73,12 +75,15 @@ static int __platform_pm_runtime_suspend(struct platform_device *pdev)

dev_dbg(d, "__platform_pm_runtime_suspend() [%d]\n", hwblk);

if (d->driver && d->driver->pm && d->driver->pm->runtime_suspend) {
if (d->driver) {
BUG_ON(!test_bit(PDEV_ARCHDATA_FLAG_IDLE, &ad->flags));
ret = 0;

hwblk_enable(hwblk_info, hwblk);
ret = d->driver->pm->runtime_suspend(d);
hwblk_disable(hwblk_info, hwblk);
if (d->driver->pm && d->driver->pm->runtime_suspend) {
hwblk_enable(hwblk_info, hwblk);
ret = d->driver->pm->runtime_suspend(d);
hwblk_disable(hwblk_info, hwblk);
}

if (!ret) {
set_bit(PDEV_ARCHDATA_FLAG_SUSP, &ad->flags);
Expand Down

0 comments on commit 79c83b9

Please sign in to comment.