]> err.no Git - linux-2.6/blobdiff - drivers/base/power/resume.c
drivers/base/power/: make 2 functions static
[linux-2.6] / drivers / base / power / resume.c
index a2c64188d7133fc95c31343592039f7ace18a64b..67948bac993850658b2b23d7e9910e2e859420d1 100644 (file)
@@ -20,7 +20,7 @@
  *
  */
 
-int resume_device(struct device * dev)
+static int resume_device(struct device * dev)
 {
        int error = 0;
 
@@ -29,14 +29,6 @@ int resume_device(struct device * dev)
 
        down(&dev->sem);
 
-       if (dev->power.pm_parent
-                       && dev->power.pm_parent->power.power_state.event) {
-               dev_err(dev, "PM: resume from %d, parent %s still %d\n",
-                       dev->power.power_state.event,
-                       dev->power.pm_parent->bus_id,
-                       dev->power.pm_parent->power.power_state.event);
-       }
-
        if (dev->bus && dev->bus->resume) {
                dev_dbg(dev,"resuming\n");
                error = dev->bus->resume(dev);
@@ -80,7 +72,7 @@ static int resume_device_early(struct device * dev)
  */
 void dpm_resume(void)
 {
-       down(&dpm_list_sem);
+       mutex_lock(&dpm_list_mtx);
        while(!list_empty(&dpm_off)) {
                struct list_head * entry = dpm_off.next;
                struct device * dev = to_device(entry);
@@ -88,13 +80,12 @@ void dpm_resume(void)
                get_device(dev);
                list_move_tail(entry, &dpm_active);
 
-               up(&dpm_list_sem);
-               if (!dev->power.prev_state.event)
-                       resume_device(dev);
-               down(&dpm_list_sem);
+               mutex_unlock(&dpm_list_mtx);
+               resume_device(dev);
+               mutex_lock(&dpm_list_mtx);
                put_device(dev);
        }
-       up(&dpm_list_sem);
+       mutex_unlock(&dpm_list_mtx);
 }
 
 
@@ -108,9 +99,9 @@ void dpm_resume(void)
 void device_resume(void)
 {
        might_sleep();
-       down(&dpm_sem);
+       mutex_lock(&dpm_mtx);
        dpm_resume();
-       up(&dpm_sem);
+       mutex_unlock(&dpm_mtx);
 }
 
 EXPORT_SYMBOL_GPL(device_resume);