Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 230435
b: refs/heads/master
c: be4fcdd
h: refs/heads/master
i:
  230433: 2da4141
  230431: 1eb723a
v: v3
  • Loading branch information
Mark Brown committed Dec 21, 2010
1 parent b82dcf3 commit ef7c1d0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 458350b31f4f7a4d1db0c268cf1cced5afeeb8a5
refs/heads/master: be4fcddd17f01ede0ff46cf86c5ab8c5adb37175
9 changes: 6 additions & 3 deletions trunk/sound/soc/soc-cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -1531,6 +1531,7 @@ static int snd_soc_flat_cache_init(struct snd_soc_codec *codec)

/* an array of all supported compression types */
static const struct snd_soc_cache_ops cache_types[] = {
/* Flat *must* be the first entry for fallback */
{
.id = SND_SOC_FLAT_COMPRESSION,
.name = "flat",
Expand Down Expand Up @@ -1567,10 +1568,12 @@ int snd_soc_cache_init(struct snd_soc_codec *codec)
for (i = 0; i < ARRAY_SIZE(cache_types); ++i)
if (cache_types[i].id == codec->compress_type)
break;

/* Fall back to flat compression */
if (i == ARRAY_SIZE(cache_types)) {
dev_err(codec->dev, "Could not match compress type: %d\n",
codec->compress_type);
return -EINVAL;
dev_warn(codec->dev, "Could not match compress type: %d\n",
codec->compress_type);
i = 0;
}

mutex_init(&codec->cache_rw_mutex);
Expand Down

0 comments on commit ef7c1d0

Please sign in to comment.