diff options
Diffstat (limited to 'drivers/base/power/suspend.c')
-rw-r--r-- | drivers/base/power/suspend.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/base/power/suspend.c b/drivers/base/power/suspend.c index 0ec44ef840be..807e13fb205b 100644 --- a/drivers/base/power/suspend.c +++ b/drivers/base/power/suspend.c | |||
@@ -39,6 +39,7 @@ int suspend_device(struct device * dev, pm_message_t state) | |||
39 | { | 39 | { |
40 | int error = 0; | 40 | int error = 0; |
41 | 41 | ||
42 | down(&dev->sem); | ||
42 | if (dev->power.power_state) { | 43 | if (dev->power.power_state) { |
43 | dev_dbg(dev, "PM: suspend %d-->%d\n", | 44 | dev_dbg(dev, "PM: suspend %d-->%d\n", |
44 | dev->power.power_state, state); | 45 | dev->power.power_state, state); |
@@ -58,7 +59,7 @@ int suspend_device(struct device * dev, pm_message_t state) | |||
58 | dev_dbg(dev, "suspending\n"); | 59 | dev_dbg(dev, "suspending\n"); |
59 | error = dev->bus->suspend(dev, state); | 60 | error = dev->bus->suspend(dev, state); |
60 | } | 61 | } |
61 | 62 | up(&dev->sem); | |
62 | return error; | 63 | return error; |
63 | } | 64 | } |
64 | 65 | ||