summaryrefslogtreecommitdiff
path: root/sound/soc/soc-link.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/soc-link.c')
-rw-r--r--sound/soc/soc-link.c28
1 files changed, 7 insertions, 21 deletions
diff --git a/sound/soc/soc-link.c b/sound/soc/soc-link.c
index fee4022708bc..02fd68f2e702 100644
--- a/sound/soc/soc-link.c
+++ b/sound/soc/soc-link.c
@@ -12,22 +12,8 @@
static inline int _soc_link_ret(struct snd_soc_pcm_runtime *rtd,
const char *func, int ret)
{
- /* Positive, Zero values are not errors */
- if (ret >= 0)
- return ret;
-
- /* Negative values might be errors */
- switch (ret) {
- case -EPROBE_DEFER:
- case -ENOTSUPP:
- break;
- default:
- dev_err(rtd->dev,
- "ASoC: error at %s on %s: %d\n",
- func, rtd->dai_link->name, ret);
- }
-
- return ret;
+ return snd_soc_ret(rtd->dev, ret,
+ "at %s() on %s\n", func, rtd->dai_link->name);
}
/*
@@ -35,7 +21,7 @@ static inline int _soc_link_ret(struct snd_soc_pcm_runtime *rtd,
* In such case, we can update these macros.
*/
#define soc_link_mark_push(rtd, substream, tgt) ((rtd)->mark_##tgt = substream)
-#define soc_link_mark_pop(rtd, substream, tgt) ((rtd)->mark_##tgt = NULL)
+#define soc_link_mark_pop(rtd, tgt) ((rtd)->mark_##tgt = NULL)
#define soc_link_mark_match(rtd, substream, tgt) ((rtd)->mark_##tgt == substream)
int snd_soc_link_init(struct snd_soc_pcm_runtime *rtd)
@@ -94,7 +80,7 @@ void snd_soc_link_shutdown(struct snd_pcm_substream *substream,
rtd->dai_link->ops->shutdown(substream);
/* remove marked substream */
- soc_link_mark_pop(rtd, substream, startup);
+ soc_link_mark_pop(rtd, startup);
}
int snd_soc_link_prepare(struct snd_pcm_substream *substream)
@@ -138,7 +124,7 @@ void snd_soc_link_hw_free(struct snd_pcm_substream *substream, int rollback)
rtd->dai_link->ops->hw_free(substream);
/* remove marked substream */
- soc_link_mark_pop(rtd, substream, hw_params);
+ soc_link_mark_pop(rtd, hw_params);
}
static int soc_link_trigger(struct snd_pcm_substream *substream, int cmd)
@@ -175,7 +161,7 @@ int snd_soc_link_trigger(struct snd_pcm_substream *substream, int cmd,
break;
ret = soc_link_trigger(substream, cmd);
- soc_link_mark_pop(rtd, substream, startup);
+ soc_link_mark_pop(rtd, startup);
}
return ret;
@@ -209,7 +195,7 @@ void snd_soc_link_compr_shutdown(struct snd_compr_stream *cstream,
rtd->dai_link->compr_ops->shutdown)
rtd->dai_link->compr_ops->shutdown(cstream);
- soc_link_mark_pop(rtd, cstream, compr_startup);
+ soc_link_mark_pop(rtd, compr_startup);
}
EXPORT_SYMBOL_GPL(snd_soc_link_compr_shutdown);