From: Peng Fan Date: Fri, 7 Aug 2015 08:43:42 +0000 (+0800) Subject: power: regulator use node name when no regulator-name X-Git-Tag: v2015.10-rc2~161 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cf2600111dfc83e921e3ba40f3cb187163165828;p=platform%2Fkernel%2Fu-boot.git power: regulator use node name when no regulator-name If there is no property named 'regulator-name' for regulators, choose node name instead, but not directly return failure value. Signed-off-by: Peng Fan Cc: Przemyslaw Marczak Cc: Simon Glass --- diff --git a/drivers/power/regulator/regulator-uclass.c b/drivers/power/regulator/regulator-uclass.c index f3fe7a5..a5170df 100644 --- a/drivers/power/regulator/regulator-uclass.c +++ b/drivers/power/regulator/regulator-uclass.c @@ -256,7 +256,9 @@ static int regulator_post_bind(struct udevice *dev) if (!uc_pdata->name) { debug("%s: dev: %s has no property 'regulator-name'\n", __func__, dev->name); - return -EINVAL; + uc_pdata->name = fdt_get_name(blob, offset, NULL); + if (!uc_pdata->name) + return -EINVAL; } if (regulator_name_is_unique(dev, uc_pdata->name))