/* Note: drivers must ensure that all regulator_enable calls made on this regulator source are balanced by regulator_disable calls prior to calling this function.  */
void regulator_put(struct regulator *regulator)
/* Note: drivers must ensure that all regulator_enable calls made on this regulator source are balanced by regulator_disable calls prior to calling this function.  */
void regulator_put(struct regulator *regulator)
{
	struct regulator_dev *rdev;
	if (regulator == NULL || IS_ERR(regulator))
		return;
	mutex_lock(&regulator_list_mutex);
	rdev = regulator->rdev;
	if (regulator->dev) {
		sysfs_remove_link(&rdev->dev.kobj, regulator->supply_name);
		kfree(regulator->supply_name);
		device_remove_file(regulator->dev, &regulator->dev_attr);
		kfree(regulator->dev_attr.attr.name);
	}
	list_del(&regulator->list);
	kfree(regulator);
	rdev->open_count--;
	rdev->exclusive = 0;
	module_put(rdev->owner);
	mutex_unlock(&regulator_list_mutex);
}