[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250918112102.64314-1-thorsten.blum@linux.dev>
Date: Thu, 18 Sep 2025 13:21:02 +0200
From: Thorsten Blum <thorsten.blum@...ux.dev>
To: Daniel Mack <daniel@...que.org>,
Haojian Zhuang <haojian.zhuang@...il.com>,
Robert Jarzmik <robert.jarzmik@...e.fr>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>
Cc: Thorsten Blum <thorsten.blum@...ux.dev>,
linux-arm-kernel@...ts.infradead.org,
linux-sound@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] ASoC: pxa: Return -EOPNOTSUPP instead of -EINVAL
Return -EOPNOTSUPP from mmp_sspa_set_dai_sysclk() instead of -EINVAL for
unsupported clock ids, and remove the obsolete comment.
Replace other -ENOTSUPP returns with -EOPNOTSUPP to comply with SUSv4
error code guidelines and silence multiple checkpatch warnings:
ENOTSUPP is not a SUSV4 error code, prefer EOPNOTSUPP
Signed-off-by: Thorsten Blum <thorsten.blum@...ux.dev>
---
sound/soc/pxa/mmp-sspa.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/sound/soc/pxa/mmp-sspa.c b/sound/soc/pxa/mmp-sspa.c
index 73f36c9dd35c..38815ca8f152 100644
--- a/sound/soc/pxa/mmp-sspa.c
+++ b/sound/soc/pxa/mmp-sspa.c
@@ -111,7 +111,7 @@ static int mmp_sspa_set_dai_sysclk(struct snd_soc_dai *cpu_dai,
int ret = 0;
if (dev->of_node)
- return -ENOTSUPP;
+ return -EOPNOTSUPP;
switch (clk_id) {
case MMP_SSPA_CLK_AUDIO:
@@ -121,8 +121,7 @@ static int mmp_sspa_set_dai_sysclk(struct snd_soc_dai *cpu_dai,
break;
case MMP_SSPA_CLK_PLL:
case MMP_SSPA_CLK_VCXO:
- /* not support yet */
- return -EINVAL;
+ return -EOPNOTSUPP;
default:
return -EINVAL;
}
@@ -139,7 +138,7 @@ static int mmp_sspa_set_dai_pll(struct snd_soc_dai *cpu_dai, int pll_id,
int ret = 0;
if (dev->of_node)
- return -ENOTSUPP;
+ return -EOPNOTSUPP;
switch (pll_id) {
case MMP_SYSCLK:
--
2.51.0
Powered by blists - more mailing lists