Skip to content

Commit

Permalink
ASoC: core: Add platform component mutex
Browse files Browse the repository at this point in the history
Add mutex support for platform IO operations. e.g. can be used
for platform DAPM widget IO ops.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Liam Girdwood authored and Mark Brown committed Mar 6, 2012
1 parent c25cd15 commit cc22d37
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/sound/soc.h
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,7 @@ struct snd_soc_platform {
int id;
struct device *dev;
struct snd_soc_platform_driver *driver;
struct mutex mutex;

unsigned int suspended:1; /* platform is suspended */
unsigned int probed:1;
Expand Down
1 change: 1 addition & 0 deletions sound/soc/soc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -3382,6 +3382,7 @@ int snd_soc_register_platform(struct device *dev,
platform->dapm.dev = dev;
platform->dapm.platform = platform;
platform->dapm.stream_event = platform_drv->stream_event;
mutex_init(&platform->mutex);

mutex_lock(&client_mutex);
list_add(&platform->list, &platform_list);
Expand Down

0 comments on commit cc22d37

Please sign in to comment.