ASoC: core: Return -ENOTSUPP from set_channel_map() if no operation provided
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Wed, 3 Jul 2019 12:30:02 +0000 (13:30 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 3 Jul 2019 23:02:52 +0000 (00:02 +0100)
It makes it easier for common code to work with snd_soc_dai_set_channel_map()
by distinguishing between operation not being supported and an error.
This is done inline with others snd_soc_dai.* apis.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20190703123002.12427-1-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-core.c

index b9061cd8d7878c3a1ce9b6fc748270a05be9c413..c0a774d0a5ff0ba67b2ea0e192cf073f2585b265 100644 (file)
@@ -2614,7 +2614,7 @@ int snd_soc_dai_set_channel_map(struct snd_soc_dai *dai,
                return dai->driver->ops->set_channel_map(dai, tx_num, tx_slot,
                        rx_num, rx_slot);
        else
-               return -EINVAL;
+               return -ENOTSUPP;
 }
 EXPORT_SYMBOL_GPL(snd_soc_dai_set_channel_map);