ASoC: core: Return -ENOTSUPP from set_sysclk() if no operation provided
authorMark Brown <broonie@linaro.org>
Wed, 15 Jan 2014 19:04:19 +0000 (19:04 +0000)
committerMark Brown <broonie@linaro.org>
Wed, 15 Jan 2014 23:06:59 +0000 (23:06 +0000)
Make it easier for generic code to work with set_sysclk() by distinguishing
between the operation not being supported and an error as is done for
other operations like set_dai_fmt()

Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/soc-core.c

index 03c779ebd729336ad384f100fc858c2f1126ce29..0ebf1dac330dfbc6e3ecb25ef9abaac79d2e3262 100644 (file)
@@ -3484,7 +3484,7 @@ int snd_soc_dai_set_sysclk(struct snd_soc_dai *dai, int clk_id,
                return dai->codec->driver->set_sysclk(dai->codec, clk_id, 0,
                                                      freq, dir);
        else
-               return -EINVAL;
+               return -ENOTSUPP;
 }
 EXPORT_SYMBOL_GPL(snd_soc_dai_set_sysclk);
 
@@ -3505,7 +3505,7 @@ int snd_soc_codec_set_sysclk(struct snd_soc_codec *codec, int clk_id,
                return codec->driver->set_sysclk(codec, clk_id, source,
                                                 freq, dir);
        else
-               return -EINVAL;
+               return -ENOTSUPP;
 }
 EXPORT_SYMBOL_GPL(snd_soc_codec_set_sysclk);