diff options
Diffstat (limited to 'drivers/base/power/runtime.c')
-rw-r--r-- | drivers/base/power/runtime.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/base/power/runtime.c b/drivers/base/power/runtime.c index 325962d80191..e8f0519f5dfa 100644 --- a/drivers/base/power/runtime.c +++ b/drivers/base/power/runtime.c | |||
@@ -13,10 +13,10 @@ | |||
13 | static void runtime_resume(struct device * dev) | 13 | static void runtime_resume(struct device * dev) |
14 | { | 14 | { |
15 | dev_dbg(dev, "resuming\n"); | 15 | dev_dbg(dev, "resuming\n"); |
16 | if (!dev->power.power_state) | 16 | if (!dev->power.power_state.event) |
17 | return; | 17 | return; |
18 | if (!resume_device(dev)) | 18 | if (!resume_device(dev)) |
19 | dev->power.power_state = 0; | 19 | dev->power.power_state = PMSG_ON; |
20 | } | 20 | } |
21 | 21 | ||
22 | 22 | ||
@@ -49,10 +49,10 @@ int dpm_runtime_suspend(struct device * dev, pm_message_t state) | |||
49 | int error = 0; | 49 | int error = 0; |
50 | 50 | ||
51 | down(&dpm_sem); | 51 | down(&dpm_sem); |
52 | if (dev->power.power_state == state) | 52 | if (dev->power.power_state.event == state.event) |
53 | goto Done; | 53 | goto Done; |
54 | 54 | ||
55 | if (dev->power.power_state) | 55 | if (dev->power.power_state.event) |
56 | runtime_resume(dev); | 56 | runtime_resume(dev); |
57 | 57 | ||
58 | if (!(error = suspend_device(dev, state))) | 58 | if (!(error = suspend_device(dev, state))) |