diff options
author | Dimitris Papastamos <dp@opensource.wolfsonmicro.com> | 2011-03-22 06:48:49 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-03-26 13:45:08 -0400 |
commit | acd61451e55ea5848a6ab50d39a103e146fcf7ba (patch) | |
tree | 43d4871ef699381147e5c2c025411945e1255876 /sound/soc/soc-cache.c | |
parent | 30539a18d366cff6b21f66a81e4d9dccc4a90c89 (diff) |
ASoC: soc-cache: Return -ENOSYS instead of -EINVAL
These functions fail with -EINVAL if the corresponding callbacks
are not implemented. Change them to return -ENOSYS as it is more
appropriate for unimplemented callbacks.
Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/soc-cache.c')
-rw-r--r-- | sound/soc/soc-cache.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sound/soc/soc-cache.c b/sound/soc/soc-cache.c index d7bffdd033b0..258c3b2098b5 100644 --- a/sound/soc/soc-cache.c +++ b/sound/soc/soc-cache.c | |||
@@ -1295,7 +1295,7 @@ int snd_soc_cache_init(struct snd_soc_codec *codec) | |||
1295 | codec->cache_ops->name, codec->name); | 1295 | codec->cache_ops->name, codec->name); |
1296 | return codec->cache_ops->init(codec); | 1296 | return codec->cache_ops->init(codec); |
1297 | } | 1297 | } |
1298 | return -EINVAL; | 1298 | return -ENOSYS; |
1299 | } | 1299 | } |
1300 | 1300 | ||
1301 | /* | 1301 | /* |
@@ -1310,7 +1310,7 @@ int snd_soc_cache_exit(struct snd_soc_codec *codec) | |||
1310 | codec->cache_ops->name, codec->name); | 1310 | codec->cache_ops->name, codec->name); |
1311 | return codec->cache_ops->exit(codec); | 1311 | return codec->cache_ops->exit(codec); |
1312 | } | 1312 | } |
1313 | return -EINVAL; | 1313 | return -ENOSYS; |
1314 | } | 1314 | } |
1315 | 1315 | ||
1316 | /** | 1316 | /** |
@@ -1334,7 +1334,7 @@ int snd_soc_cache_read(struct snd_soc_codec *codec, | |||
1334 | } | 1334 | } |
1335 | 1335 | ||
1336 | mutex_unlock(&codec->cache_rw_mutex); | 1336 | mutex_unlock(&codec->cache_rw_mutex); |
1337 | return -EINVAL; | 1337 | return -ENOSYS; |
1338 | } | 1338 | } |
1339 | EXPORT_SYMBOL_GPL(snd_soc_cache_read); | 1339 | EXPORT_SYMBOL_GPL(snd_soc_cache_read); |
1340 | 1340 | ||
@@ -1359,7 +1359,7 @@ int snd_soc_cache_write(struct snd_soc_codec *codec, | |||
1359 | } | 1359 | } |
1360 | 1360 | ||
1361 | mutex_unlock(&codec->cache_rw_mutex); | 1361 | mutex_unlock(&codec->cache_rw_mutex); |
1362 | return -EINVAL; | 1362 | return -ENOSYS; |
1363 | } | 1363 | } |
1364 | EXPORT_SYMBOL_GPL(snd_soc_cache_write); | 1364 | EXPORT_SYMBOL_GPL(snd_soc_cache_write); |
1365 | 1365 | ||
@@ -1382,7 +1382,7 @@ int snd_soc_cache_sync(struct snd_soc_codec *codec) | |||
1382 | } | 1382 | } |
1383 | 1383 | ||
1384 | if (!codec->cache_ops || !codec->cache_ops->sync) | 1384 | if (!codec->cache_ops || !codec->cache_ops->sync) |
1385 | return -EINVAL; | 1385 | return -ENOSYS; |
1386 | 1386 | ||
1387 | if (codec->cache_ops->name) | 1387 | if (codec->cache_ops->name) |
1388 | name = codec->cache_ops->name; | 1388 | name = codec->cache_ops->name; |