diff options
Diffstat (limited to 'drivers/base/power/runtime.c')
-rw-r--r-- | drivers/base/power/runtime.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/base/power/runtime.c b/drivers/base/power/runtime.c index 96370ec1d673..df6174d85866 100644 --- a/drivers/base/power/runtime.c +++ b/drivers/base/power/runtime.c | |||
@@ -32,9 +32,9 @@ static void runtime_resume(struct device * dev) | |||
32 | 32 | ||
33 | void dpm_runtime_resume(struct device * dev) | 33 | void dpm_runtime_resume(struct device * dev) |
34 | { | 34 | { |
35 | down(&dpm_sem); | 35 | mutex_lock(&dpm_mtx); |
36 | runtime_resume(dev); | 36 | runtime_resume(dev); |
37 | up(&dpm_sem); | 37 | mutex_unlock(&dpm_mtx); |
38 | } | 38 | } |
39 | EXPORT_SYMBOL(dpm_runtime_resume); | 39 | EXPORT_SYMBOL(dpm_runtime_resume); |
40 | 40 | ||
@@ -49,7 +49,7 @@ int dpm_runtime_suspend(struct device * dev, pm_message_t state) | |||
49 | { | 49 | { |
50 | int error = 0; | 50 | int error = 0; |
51 | 51 | ||
52 | down(&dpm_sem); | 52 | mutex_lock(&dpm_mtx); |
53 | if (dev->power.power_state.event == state.event) | 53 | if (dev->power.power_state.event == state.event) |
54 | goto Done; | 54 | goto Done; |
55 | 55 | ||
@@ -59,7 +59,7 @@ int dpm_runtime_suspend(struct device * dev, pm_message_t state) | |||
59 | if (!(error = suspend_device(dev, state))) | 59 | if (!(error = suspend_device(dev, state))) |
60 | dev->power.power_state = state; | 60 | dev->power.power_state = state; |
61 | Done: | 61 | Done: |
62 | up(&dpm_sem); | 62 | mutex_unlock(&dpm_mtx); |
63 | return error; | 63 | return error; |
64 | } | 64 | } |
65 | EXPORT_SYMBOL(dpm_runtime_suspend); | 65 | EXPORT_SYMBOL(dpm_runtime_suspend); |
@@ -78,8 +78,8 @@ EXPORT_SYMBOL(dpm_runtime_suspend); | |||
78 | */ | 78 | */ |
79 | void dpm_set_power_state(struct device * dev, pm_message_t state) | 79 | void dpm_set_power_state(struct device * dev, pm_message_t state) |
80 | { | 80 | { |
81 | down(&dpm_sem); | 81 | mutex_lock(&dpm_mtx); |
82 | dev->power.power_state = state; | 82 | dev->power.power_state = state; |
83 | up(&dpm_sem); | 83 | mutex_unlock(&dpm_mtx); |
84 | } | 84 | } |
85 | #endif /* 0 */ | 85 | #endif /* 0 */ |