Commit 2c4ee9b5 authored by Matti J. Aaltonen's avatar Matti J. Aaltonen Committed by Liam Girdwood

ASoC: WL1273 FM Radio: Eliminate unnecessary error return value.

With this change it's not a error to call wl1273_set_audio_route
when the codec is active if the new routing value is the same
as the current active setting.
Signed-off-by: default avatarMatti J. Aaltonen <matti.j.aaltonen@nokia.com>
Acked-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
parent c23fd751
...@@ -193,6 +193,9 @@ static int snd_wl1273_set_audio_route(struct snd_kcontrol *kcontrol, ...@@ -193,6 +193,9 @@ static int snd_wl1273_set_audio_route(struct snd_kcontrol *kcontrol,
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
struct wl1273_priv *wl1273 = snd_soc_codec_get_drvdata(codec); struct wl1273_priv *wl1273 = snd_soc_codec_get_drvdata(codec);
if (wl1273->mode == ucontrol->value.integer.value[0])
return 0;
/* Do not allow changes while stream is running */ /* Do not allow changes while stream is running */
if (codec->active) if (codec->active)
return -EPERM; return -EPERM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment