Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

After commit: 6e3f62f0793e ("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: Inha Song <ideal.song@samsung.com>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>

authored by

Inha Song and committed by
Lee Jones
fef22cb4 3daa122d

+3 -3
+3 -3
drivers/mfd/wm8994-core.c
··· 36 36 static const struct mfd_cell wm8994_regulator_devs[] = { 37 37 { 38 38 .name = "wm8994-ldo", 39 - .id = 1, 39 + .id = 0, 40 40 .pm_runtime_no_callbacks = true, 41 41 }, 42 42 { 43 43 .name = "wm8994-ldo", 44 - .id = 2, 44 + .id = 1, 45 45 .pm_runtime_no_callbacks = true, 46 46 }, 47 47 }; ··· 344 344 dev_set_drvdata(wm8994->dev, wm8994); 345 345 346 346 /* Add the on-chip regulators first for bootstrapping */ 347 - ret = mfd_add_devices(wm8994->dev, -1, 347 + ret = mfd_add_devices(wm8994->dev, 0, 348 348 wm8994_regulator_devs, 349 349 ARRAY_SIZE(wm8994_regulator_devs), 350 350 NULL, 0, NULL);