/* cpuidle_register_device - registers a CPU's idle PM feature @dev: the cpu  */
int cpuidle_register_device(struct cpuidle_device *dev)
/* cpuidle_register_device - registers a CPU's idle PM feature @dev: the cpu  */
int cpuidle_register_device(struct cpuidle_device *dev)
{
	int ret;
	mutex_lock(&cpuidle_lock);
	if ((ret = __cpuidle_register_device(dev))) {
		mutex_unlock(&cpuidle_lock);
		return ret;
	}
	cpuidle_enable_device(dev);
	cpuidle_install_idle_handler();
	mutex_unlock(&cpuidle_lock);
	return 0;
}