Skip to content
Snippets Groups Projects
Commit cf260011 authored by Peng Fan's avatar Peng Fan Committed by Przemyslaw Marczak
Browse files

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: default avatarPeng Fan <Peng.Fan@freescale.com>
Cc: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Simon Glass <sjg@chromium.org>
parent 430abe1c
No related branches found
No related tags found
No related merge requests found
...@@ -256,7 +256,9 @@ static int regulator_post_bind(struct udevice *dev) ...@@ -256,7 +256,9 @@ static int regulator_post_bind(struct udevice *dev)
if (!uc_pdata->name) { if (!uc_pdata->name) {
debug("%s: dev: %s has no property 'regulator-name'\n", debug("%s: dev: %s has no property 'regulator-name'\n",
__func__, dev->name); __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)) if (regulator_name_is_unique(dev, uc_pdata->name))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment