/* Called by regulator drivers to unregister a regulator.  */
void regulator_unregister(struct regulator_dev *rdev)
/* Called by regulator drivers to unregister a regulator.  */
void regulator_unregister(struct regulator_dev *rdev)
{
	if (rdev == NULL)
		return;
	mutex_lock(&regulator_list_mutex);
	WARN_ON(rdev->open_count);
	unset_regulator_supplies(rdev);
	list_del(&rdev->list);
	if (rdev->supply)
		sysfs_remove_link(&rdev->dev.kobj, "supply");
	device_unregister(&rdev->dev);
	mutex_unlock(&regulator_list_mutex);
}