/* Called by platform initialisation code to set the supply regulator for this regulator. This ensures that a regulators supply will also be enabled by the core if it's child is enabled.  */
static int set_supply(struct regulator_dev *rdev, struct regulator_dev *supply_rdev)
/* Called by platform initialisation code to set the supply regulator for this regulator. This ensures that a regulators supply will also be enabled by the core if it's child is enabled.  */
static int set_supply(struct regulator_dev *rdev, struct regulator_dev *supply_rdev)
{
	int err;
	err = sysfs_create_link(&rdev->dev.kobj, &supply_rdev->dev.kobj,
				"supply");
	if (err) {
		printk(KERN_ERR
		       "%s: could not add device link %s err %d\n",
		       __func__, supply_rdev->dev.kobj.name, err);
		       goto out;
	}
	rdev->supply = supply_rdev;
	list_add(&rdev->slist, &supply_rdev->supply_list);
out:
	return err;
}