Skip to contentSkip to conversation

ASoC: core: Return -ENOTSUPP from set_sysclk() if no operation provided

PATCH New Mark Brown 1 participant 1 message Jan 15, 2014

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author maintainer
#0 lore raw

PATCH 1/1 ASoC: core: Return -ENOTSUPP from set_sysclk() if no operation provided

From: Mark Brown <[email protected]>

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()

---
 sound/soc/soc-core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/soc-core.c +2 -2
index 3a128f0cd752..fe1df50805a3 100644
@@ -3485,7 +3485,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);
 
@@ -3506,7 +3506,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);
 
Signature · 1 line
1.8.5.2