]> git.hungrycats.org Git - linux/commitdiff
[power] Fixup device suspend/resume function names.
authorPatrick Mochel <mochel@osdl.org>
Thu, 21 Aug 2003 04:47:37 +0000 (21:47 -0700)
committerPatrick Mochel <mochel@osdl.org>
Thu, 21 Aug 2003 04:47:37 +0000 (21:47 -0700)
- Revert names of functions back to device_{suspend,resume} since at least
  APM are still using them.

drivers/base/power/resume.c
drivers/base/power/suspend.c
include/linux/pm.h
kernel/power/main.c
kernel/power/swsusp.c

index 0f68bf95beac3785422da70a908a1ca89f820466..19c6387fec40893366273fcee8c8129b2264796a 100644 (file)
@@ -29,12 +29,12 @@ int resume_device(struct device * dev)
 
 
 /**
- *     device_pm_resume - Restore state of each device in system.
+ *     device_resume - Restore state of each device in system.
  *
  *     Restore normal device state and release the dpm_sem.
  */
 
-void device_pm_resume(void)
+void device_resume(void)
 {
        while(!list_empty(&dpm_off)) {
                struct list_head * entry = dpm_off.next;
@@ -46,6 +46,8 @@ void device_pm_resume(void)
        up(&dpm_sem);
 }
 
+EXPORT_SYMBOL(device_resume);
+
 
 /**
  *     device_power_up_irq - Power on some devices. 
@@ -77,25 +79,12 @@ void dpm_power_up(void)
  *     Called with interrupts disabled.
  */
 
-void device_pm_power_up(void)
+void device_power_up(void)
 {
        sysdev_resume();
        dpm_power_up();
 }
 
-/**
- * device_resume - resume all the devices in the system
- * @level:     stage of resume process we're at 
- * 
- *     This function is deprecated, and should be replaced with appropriate
- *     calls to device_pm_power_up() and device_pm_resume() above.
- */
-
-void device_resume(u32 level)
-{
+EXPORT_SYMBOL(device_power_up);
 
-       printk("%s is deprecated. Called from:\n",__FUNCTION__);
-       dump_stack();
-}
 
-EXPORT_SYMBOL(device_resume);
index 78b8e91f1e1a4dee4e8b49506c4bfa3be214d373..e9ca633fc12908811b1a6ae23597c2695e666b17 100644 (file)
@@ -54,7 +54,7 @@ int suspend_device(struct device * dev, u32 state)
 
 
 /**
- *     device_pm_suspend - Save state and stop all devices in system.
+ *     device_suspend - Save state and stop all devices in system.
  *     @state:         Power state to put each device in. 
  *
  *     Walk the dpm_active list, call ->suspend() for each device, and move
@@ -63,7 +63,7 @@ int suspend_device(struct device * dev, u32 state)
  *     the device to the dpm_off list. If it returns -EAGAIN, we move it to 
  *     the dpm_off_irq list. If we get a different error, try and back out. 
  *
- *     If we hit a failure with any of the devices, call device_pm_resume()
+ *     If we hit a failure with any of the devices, call device_resume()
  *     above to bring the suspended devices back to life. 
  *
  *     Note this function leaves dpm_sem held to
@@ -71,12 +71,12 @@ int suspend_device(struct device * dev, u32 state)
  *     b) prevent other PM operations from happening after we've begun.
  *     c) make sure we're exclusive when we disable interrupts.
  *
- *     device_pm_resume() will release dpm_sem after restoring state to 
+ *     device_resume() will release dpm_sem after restoring state to 
  *     all devices (as will this on error). You must call it once you've 
- *     called device_pm_suspend().
+ *     called device_suspend().
  */
 
-int device_pm_suspend(u32 state)
+int device_suspend(u32 state)
 {
        int error = 0;
 
@@ -90,13 +90,15 @@ int device_pm_suspend(u32 state)
  Done:
        return error;
  Error:
-       device_pm_resume();
+       device_resume();
        goto Done;
 }
 
+EXPORT_SYMBOL(device_suspend);
+
 
 /**
- *     device_pm_power_down - Shut down special devices.
+ *     device_power_down - Shut down special devices.
  *     @state:         Power state to enter.
  *
  *     Walk the dpm_off_irq list, calling ->power_down() for each device that
@@ -104,7 +106,7 @@ int device_pm_suspend(u32 state)
  *     done, power down system devices. 
  */
 
-int device_pm_power_down(u32 state)
+int device_power_down(u32 state)
 {
        int error = 0;
        struct device * dev;
@@ -124,23 +126,5 @@ int device_pm_power_down(u32 state)
        goto Done;
 }
 
+EXPORT_SYMBOL(device_power_down);
 
-/**
- * device_suspend - suspend all devices on the device ree
- * @state:     state we're entering
- * @level:     Stage of suspend sequence we're in.
- *
- *
- *     This function is deprecated. Calls should be replaced with
- *     appropriate calls to device_pm_suspend() and device_pm_power_down().
- */
-
-int device_suspend(u32 state, u32 level)
-{
-
-       printk("%s Called from:\n",__FUNCTION__);
-       dump_stack();
-       return -EFAULT;
-}
-
-EXPORT_SYMBOL(device_suspend);
index 70282a7943b1e819e0a7f15420816c94c5a6dc80..3017bdef5f03a1257cdd0d1f690373f6f3f23ed2 100644 (file)
@@ -240,10 +240,10 @@ struct dev_pm_info {
 
 extern void device_pm_set_parent(struct device * dev, struct device * parent);
 
-extern int device_pm_suspend(u32 state);
-extern int device_pm_power_down(u32 state);
-extern void device_pm_power_up(void);
-extern void device_pm_resume(void);
+extern int device_suspend(u32 state);
+extern int device_power_down(u32 state);
+extern void device_power_up(void);
+extern void device_resume(void);
 
 
 #endif /* __KERNEL__ */
index 422d5131fbf6848bf0302087ee0733e5fa2e7f22..1b92f13d9a77d1221d0acb3450acfcab65a43e84 100644 (file)
@@ -66,11 +66,11 @@ static int pm_suspend_standby(void)
                return -EPERM;
 
        local_irq_save(flags);
-       if ((error = device_pm_power_down(PM_SUSPEND_STANDBY)))
+       if ((error = device_power_down(PM_SUSPEND_STANDBY)))
                goto Done;
        error = pm_ops->enter(PM_SUSPEND_STANDBY);
        local_irq_restore(flags);
-       device_pm_power_up();
+       device_power_up();
  Done:
        return error;
 }
@@ -92,11 +92,11 @@ static int pm_suspend_mem(void)
                return -EPERM;
 
        local_irq_save(flags);
-       if ((error = device_pm_power_down(PM_SUSPEND_STANDBY)))
+       if ((error = device_power_down(PM_SUSPEND_STANDBY)))
                goto Done;
        error = pm_ops->enter(PM_SUSPEND_STANDBY);
        local_irq_restore(flags);
-       device_pm_power_up();
+       device_power_up();
  Done:
        return error;
 }
@@ -118,12 +118,12 @@ static int power_down(u32 mode)
        int error = 0;
 
        local_irq_save(flags);
-       device_pm_power_down(PM_SUSPEND_DISK);
+       device_power_down(PM_SUSPEND_DISK);
        switch(mode) {
        case PM_DISK_PLATFORM:
                error = pm_ops->enter(PM_SUSPEND_DISK);
                if (error) {
-                       device_pm_power_up();
+                       device_power_up();
                        local_irq_restore(flags);
                        return error;
                }
@@ -245,7 +245,7 @@ static int suspend_prepare(u32 state)
        if (state == PM_SUSPEND_DISK)
                free_some_memory();
 
-       if ((error = device_pm_suspend(state)))
+       if ((error = device_suspend(state)))
                goto Finish;
 
        return 0;
@@ -271,7 +271,7 @@ static int suspend_prepare(u32 state)
 
 static void suspend_finish(u32 state)
 {
-       device_pm_resume();
+       device_resume();
        if (pm_ops && pm_ops->finish)
                pm_ops->finish(state);
        thaw_processes();
index 4ce75e5c23bb2a162475cb5f99d14db406c0c495..2d6bac84469eefd3d7b432ab67491776a8981da2 100644 (file)
@@ -1,4 +1,4 @@
-/*
+'/*
  * linux/kernel/suspend.c
  *
  * This file is to realize architecture-independent
@@ -492,7 +492,7 @@ static int suspend_save_image(void)
 {
        int error;
 
-       device_pm_resume();
+       device_resume();
 
        lock_swapdevices();
        error = write_suspend_image();