2010-12-06 08:41:55

by Axel Lin

[permalink] [raw]
Subject: [PATCH] ASoC: Hold client_mutex while calling snd_soc_instantiate_cards()

As the comments of snd_soc_instantiate_cards() said,
snd_soc_instantiate_cards() must be called with client_mutex.

Signed-off-by: Axel Lin <[email protected]>
---
sound/soc/soc-core.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index eb950f7..0d69b91 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -3299,7 +3299,9 @@ int snd_soc_register_dais(struct device *dev,
pr_debug("Registered DAI '%s'\n", dai->name);
}

+ mutex_lock(&client_mutex);
snd_soc_instantiate_cards();
+ mutex_unlock(&client_mutex);
return 0;

err:
--
1.7.2



2010-12-06 12:36:48

by Liam Girdwood

[permalink] [raw]
Subject: Re: [PATCH] ASoC: Hold client_mutex while calling snd_soc_instantiate_cards()

On Mon, 2010-12-06 at 16:48 +0800, Axel Lin wrote:
> As the comments of snd_soc_instantiate_cards() said,
> snd_soc_instantiate_cards() must be called with client_mutex.
>
> Signed-off-by: Axel Lin <[email protected]>
> ---
Acked-by: Liam Girdwood <[email protected]>
--
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk

2010-12-06 12:55:52

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH] ASoC: Hold client_mutex while calling snd_soc_instantiate_cards()

On Mon, Dec 06, 2010 at 04:48:03PM +0800, Axel Lin wrote:
> As the comments of snd_soc_instantiate_cards() said,
> snd_soc_instantiate_cards() must be called with client_mutex.
>
> Signed-off-by: Axel Lin <[email protected]>

Applied, thanks.