/* 1.) resume CPUfreq hardware support (cpufreq_driver->resume()) 2.) schedule call cpufreq_update_policy() ASAP as interrupts are restored. It will verify that the current freq is in sync with what we believe it to be. This is a bit later than when it should be, but nonethteless it's better than calling cpufreq_driver->get() here which might re-enable interrupts...  */
static int cpufreq_resume(struct sys_device *sysdev)
/* 1.) resume CPUfreq hardware support (cpufreq_driver->resume()) 2.) schedule call cpufreq_update_policy() ASAP as interrupts are restored. It will verify that the current freq is in sync with what we believe it to be. This is a bit later than when it should be, but nonethteless it's better than calling cpufreq_driver->get() here which might re-enable interrupts...  */
static int cpufreq_resume(struct sys_device *sysdev)
{
	int ret = 0;
	int cpu = sysdev->id;
	struct cpufreq_policy *cpu_policy;
	dprintk("resuming cpu %u\n", cpu);
	if (!cpu_online(cpu))
		return 0;
	cpu_policy = cpufreq_cpu_get(cpu);
	if (!cpu_policy)
		return -EINVAL;
	if (unlikely(cpu_policy->cpu != cpu))
		goto fail;
	if (cpufreq_driver->resume) {
		ret = cpufreq_driver->resume(cpu_policy);
		if (ret) {
			printk(KERN_ERR "cpufreq: resume failed in ->resume "
					"step on CPU %u\n", cpu_policy->cpu);
			goto fail;
		}
	}
	schedule_work(&cpu_policy->update);
fail:
	cpufreq_cpu_put(cpu_policy);
	return ret;
}