/* This function must be called between cpuidle_pause_and_lock and cpuidle_resume_and_unlock when used externally.  */
void cpuidle_disable_device(struct cpuidle_device *dev)
/* This function must be called between cpuidle_pause_and_lock and cpuidle_resume_and_unlock when used externally.  */
void cpuidle_disable_device(struct cpuidle_device *dev)
{
	if (!dev->enabled)
		return;
	if (!cpuidle_curr_driver || !cpuidle_curr_governor)
		return;
	dev->enabled = 0;
	if (cpuidle_curr_governor->disable)
		cpuidle_curr_governor->disable(dev);
	cpuidle_remove_state_sysfs(dev);
	enabled_devices--;
}