提交 cf260011 编写于 作者: P Peng Fan 提交者: Przemyslaw Marczak

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: NPeng Fan <Peng.Fan@freescale.com>
Cc: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Simon Glass <sjg@chromium.org>
上级 430abe1c
......@@ -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))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册