/* cpuidle_register_driver - registers a driver @drv: the driver  */
int cpuidle_register_driver(struct cpuidle_driver *drv)
/* cpuidle_register_driver - registers a driver @drv: the driver  */
int cpuidle_register_driver(struct cpuidle_driver *drv)
{
	if (!drv)
		return -EINVAL;
	spin_lock(&cpuidle_driver_lock);
	if (cpuidle_curr_driver) {
		spin_unlock(&cpuidle_driver_lock);
		return -EBUSY;
	}
	cpuidle_curr_driver = drv;
	spin_unlock(&cpuidle_driver_lock);
	return 0;
}