alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [alsa-devel] [RESEND PATCH] mfd: wm8994: set mfd id-base for regulator devs creation to avoid conflicts
@ 2015-01-08  1:04 Inha Song
  2015-01-08  9:33 ` Charles Keepax
  2015-01-20 11:30 ` Lee Jones
  0 siblings, 2 replies; 3+ messages in thread
From: Inha Song @ 2015-01-08  1:04 UTC (permalink / raw)
  To: broonie, lgirdwood, lee.jones, ckeepax
  Cc: sameo, patches, linux-kernel, alsa-devel, Inha Song

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>
---
 drivers/mfd/wm8994-core.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/mfd/wm8994-core.c b/drivers/mfd/wm8994-core.c
index e6fab94..47cd3cc 100644
--- a/drivers/mfd/wm8994-core.c
+++ b/drivers/mfd/wm8994-core.c
@@ -36,12 +36,12 @@
 static const struct mfd_cell wm8994_regulator_devs[] = {
 	{
 		.name = "wm8994-ldo",
-		.id = 1,
+		.id = 0,
 		.pm_runtime_no_callbacks = true,
 	},
 	{
 		.name = "wm8994-ldo",
-		.id = 2,
+		.id = 1,
 		.pm_runtime_no_callbacks = true,
 	},
 };
@@ -344,7 +344,7 @@ static int wm8994_device_init(struct wm8994 *wm8994, int irq)
 	dev_set_drvdata(wm8994->dev, wm8994);
 
 	/* 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,
 			      ARRAY_SIZE(wm8994_regulator_devs),
 			      NULL, 0, NULL);
-- 
2.0.0.390.gcb682f8

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [alsa-devel] [RESEND PATCH] mfd: wm8994: set mfd id-base for regulator devs creation to avoid conflicts
  2015-01-08  1:04 [alsa-devel] [RESEND PATCH] mfd: wm8994: set mfd id-base for regulator devs creation to avoid conflicts Inha Song
@ 2015-01-08  9:33 ` Charles Keepax
  2015-01-20 11:30 ` Lee Jones
  1 sibling, 0 replies; 3+ messages in thread
From: Charles Keepax @ 2015-01-08  9:33 UTC (permalink / raw)
  To: Inha Song
  Cc: broonie, lgirdwood, lee.jones, sameo, patches, linux-kernel,
	alsa-devel

On Thu, Jan 08, 2015 at 10:04:33AM +0900, Inha Song wrote:
> 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>

Thanks,
Charles

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [alsa-devel] [RESEND PATCH] mfd: wm8994: set mfd id-base for regulator devs creation to avoid conflicts
  2015-01-08  1:04 [alsa-devel] [RESEND PATCH] mfd: wm8994: set mfd id-base for regulator devs creation to avoid conflicts Inha Song
  2015-01-08  9:33 ` Charles Keepax
@ 2015-01-20 11:30 ` Lee Jones
  1 sibling, 0 replies; 3+ messages in thread
From: Lee Jones @ 2015-01-20 11:30 UTC (permalink / raw)
  To: Inha Song
  Cc: broonie, lgirdwood, ckeepax, sameo, patches, linux-kernel,
	alsa-devel

On Thu, 08 Jan 2015, Inha Song wrote:

> 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>
> ---
>  drivers/mfd/wm8994-core.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Applied, thanks.

> diff --git a/drivers/mfd/wm8994-core.c b/drivers/mfd/wm8994-core.c
> index e6fab94..47cd3cc 100644
> --- a/drivers/mfd/wm8994-core.c
> +++ b/drivers/mfd/wm8994-core.c
> @@ -36,12 +36,12 @@
>  static const struct mfd_cell wm8994_regulator_devs[] = {
>  	{
>  		.name = "wm8994-ldo",
> -		.id = 1,
> +		.id = 0,
>  		.pm_runtime_no_callbacks = true,
>  	},
>  	{
>  		.name = "wm8994-ldo",
> -		.id = 2,
> +		.id = 1,
>  		.pm_runtime_no_callbacks = true,
>  	},
>  };
> @@ -344,7 +344,7 @@ static int wm8994_device_init(struct wm8994 *wm8994, int irq)
>  	dev_set_drvdata(wm8994->dev, wm8994);
>  
>  	/* 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,
>  			      ARRAY_SIZE(wm8994_regulator_devs),
>  			      NULL, 0, NULL);

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-01-20 11:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-08  1:04 [alsa-devel] [RESEND PATCH] mfd: wm8994: set mfd id-base for regulator devs creation to avoid conflicts Inha Song
2015-01-08  9:33 ` Charles Keepax
2015-01-20 11:30 ` Lee Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).