PM core: rename suspend and resume functions

This patch (as1241) renames a bunch of functions in the PM core.
Rather than go through a boring list of name changes, suffice it to
say that in the end we have a bunch of pairs of functions:

	device_resume_noirq	dpm_resume_noirq
	device_resume		dpm_resume
	device_complete		dpm_complete
	device_suspend_noirq	dpm_suspend_noirq
	device_suspend		dpm_suspend
	device_prepare		dpm_prepare

in which device_X does the X operation on a single device and dpm_X
invokes device_X for all devices in the dpm_list.

In addition, the old dpm_power_up and device_resume_noirq have been
combined into a single function (dpm_resume_noirq).

Lastly, dpm_suspend_start and dpm_resume_end are the renamed versions
of the former top-level device_suspend and device_resume routines.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
This commit is contained in:
Alan Stern
2009-05-24 22:05:42 +02:00
committed by Rafael J. Wysocki
parent e39a71ef80
commit d161630297
7 changed files with 80 additions and 93 deletions

View File

@ -43,7 +43,7 @@ static int xen_suspend(void *data)
if (err) {
printk(KERN_ERR "xen_suspend: sysdev_suspend failed: %d\n",
err);
device_resume_noirq(PMSG_RESUME);
dpm_resume_noirq(PMSG_RESUME);
return err;
}
@ -69,7 +69,7 @@ static int xen_suspend(void *data)
}
sysdev_resume();
device_resume_noirq(PMSG_RESUME);
dpm_resume_noirq(PMSG_RESUME);
return 0;
}
@ -92,18 +92,18 @@ static void do_suspend(void)
}
#endif
err = device_suspend(PMSG_SUSPEND);
err = dpm_suspend_start(PMSG_SUSPEND);
if (err) {
printk(KERN_ERR "xen suspend: device_suspend %d\n", err);
printk(KERN_ERR "xen suspend: dpm_suspend_start %d\n", err);
goto out;
}
printk(KERN_DEBUG "suspending xenstore...\n");
xs_suspend();
err = device_suspend_noirq(PMSG_SUSPEND);
err = dpm_suspend_noirq(PMSG_SUSPEND);
if (err) {
printk(KERN_ERR "device_suspend_noirq failed: %d\n", err);
printk(KERN_ERR "dpm_suspend_noirq failed: %d\n", err);
goto resume_devices;
}
@ -119,10 +119,10 @@ static void do_suspend(void)
} else
xs_suspend_cancel();
device_resume_noirq(PMSG_RESUME);
dpm_resume_noirq(PMSG_RESUME);
resume_devices:
device_resume(PMSG_RESUME);
dpm_resume_end(PMSG_RESUME);
/* Make sure timer events get retriggered on all CPUs */
clock_was_set();