Skip to content

Commit

Permalink
ASoC: core: Return -ENOTSUPP from set_sysclk() if no operation provided
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mark Brown committed Jan 15, 2014
1 parent dcf0fa2 commit 1104a9c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sound/soc/soc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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);

Expand Down

0 comments on commit 1104a9c

Please sign in to comment.