cpufreq: Use syscore_ops for boot CPU suspend/resume (v2)
authorRafael J. Wysocki <rjw@sisk.pl>
Wed, 23 Mar 2011 21:16:32 +0000 (22:16 +0100)
committerRafael J. Wysocki <rjw@sisk.pl>
Wed, 23 Mar 2011 21:16:32 +0000 (22:16 +0100)
commite00e56dfd3cf1d209ce630a2b440c91e4a30bbd3
tree4d1329036e250db15411b21b15a158f9042945bd
parentfb3600cc50302c9577b76838fcac1ee78828007d
cpufreq: Use syscore_ops for boot CPU suspend/resume (v2)

The cpufreq subsystem uses sysdev suspend and resume for
executing cpufreq_suspend() and cpufreq_resume(), respectively,
during system suspend, after interrupts have been switched off on the
boot CPU, and during system resume, while interrupts are still off on
the boot CPU.  In both cases the other CPUs are off-line at the
relevant point (either they have been switched off via CPU hotplug
during suspend, or they haven't been switched on yet during resume).
For this reason, although it may seem that cpufreq_suspend() and
cpufreq_resume() are executed for all CPUs in the system, they are
only called for the boot CPU in fact, which is quite confusing.

To remove the confusion and to prepare for elimiating sysdev
suspend and resume operations from the kernel enirely, convernt
cpufreq to using a struct syscore_ops object for the boot CPU
suspend and resume and rename the callbacks so that their names
reflect their purpose.  In addition, put some explanatory remarks
into their kerneldoc comments.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
drivers/cpufreq/cpufreq.c