summaryrefslogtreecommitdiff
path: root/drivers/base/power/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/base/power/main.c')
-rw-r--r--drivers/base/power/main.c23
1 files changed, 1 insertions, 22 deletions
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
index ba75e0d2a7f6..1b1a786b7dec 100644
--- a/drivers/base/power/main.c
+++ b/drivers/base/power/main.c
@@ -21,7 +21,6 @@
#include <linux/kallsyms.h>
#include <linux/mutex.h>
#include <linux/pm.h>
-#include <linux/pm_runtime.h>
#include <linux/resume-trace.h>
#include <linux/rwsem.h>
#include <linux/interrupt.h>
@@ -50,17 +49,6 @@ static DEFINE_MUTEX(dpm_list_mtx);
static bool transition_started;
/**
- * device_pm_init - Initialize the PM-related part of a device object
- * @dev: Device object being initialized.
- */
-void device_pm_init(struct device *dev)
-{
- dev->power.status = DPM_ON;
- spin_lock_init(&dev->power.lock);
- pm_runtime_init(dev);
-}
-
-/**
* device_pm_lock - lock the list of active devices used by the PM core
*/
void device_pm_lock(void)
@@ -117,7 +105,6 @@ void device_pm_remove(struct device *dev)
mutex_lock(&dpm_list_mtx);
list_del_init(&dev->power.entry);
mutex_unlock(&dpm_list_mtx);
- pm_runtime_remove(dev);
}
/**
@@ -525,7 +512,6 @@ static void dpm_complete(pm_message_t state)
mutex_unlock(&dpm_list_mtx);
device_complete(dev, state);
- pm_runtime_put_noidle(dev);
mutex_lock(&dpm_list_mtx);
}
@@ -771,14 +757,7 @@ static int dpm_prepare(pm_message_t state)
dev->power.status = DPM_PREPARING;
mutex_unlock(&dpm_list_mtx);
- pm_runtime_get_noresume(dev);
- if (pm_runtime_barrier(dev) && device_may_wakeup(dev)) {
- /* Wake-up requested during system sleep transition. */
- pm_runtime_put_noidle(dev);
- error = -EBUSY;
- } else {
- error = device_prepare(dev, state);
- }
+ error = device_prepare(dev, state);
mutex_lock(&dpm_list_mtx);
if (error) {