Commit fef22cb4 authored by Inha Song's avatar Inha Song Committed by Lee Jones

mfd: wm8994: Set mfd id-base for regulator devs creation to avoid conflicts

After commit: 6e3f62f0 ("mfd: core: Fix platform-device id generation")
We must set the id base when register a duplicate name of mfd_cell.
If not, duplicate filename error was reported.

- sysfs: cannot create duplicate filename '/devices/.../wm8994-ldo'
Signed-off-by: default avatarInha Song <ideal.song@samsung.com>
Acked-by: default avatarCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent 3daa122d
...@@ -36,12 +36,12 @@ ...@@ -36,12 +36,12 @@
static const struct mfd_cell wm8994_regulator_devs[] = { static const struct mfd_cell wm8994_regulator_devs[] = {
{ {
.name = "wm8994-ldo", .name = "wm8994-ldo",
.id = 1, .id = 0,
.pm_runtime_no_callbacks = true, .pm_runtime_no_callbacks = true,
}, },
{ {
.name = "wm8994-ldo", .name = "wm8994-ldo",
.id = 2, .id = 1,
.pm_runtime_no_callbacks = true, .pm_runtime_no_callbacks = true,
}, },
}; };
...@@ -344,7 +344,7 @@ static int wm8994_device_init(struct wm8994 *wm8994, int irq) ...@@ -344,7 +344,7 @@ static int wm8994_device_init(struct wm8994 *wm8994, int irq)
dev_set_drvdata(wm8994->dev, wm8994); dev_set_drvdata(wm8994->dev, wm8994);
/* Add the on-chip regulators first for bootstrapping */ /* Add the on-chip regulators first for bootstrapping */
ret = mfd_add_devices(wm8994->dev, -1, ret = mfd_add_devices(wm8994->dev, 0,
wm8994_regulator_devs, wm8994_regulator_devs,
ARRAY_SIZE(wm8994_regulator_devs), ARRAY_SIZE(wm8994_regulator_devs),
NULL, 0, NULL); NULL, 0, NULL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment