From: srinivas.kandagatla@linaro.org
To: Mark Brown <broonie@kernel.org>,
Banajit Goswami <bgoswami@codeaurora.org>,
alsa-devel@alsa-project.org
Cc: damien.riegel@savoirfairelinux.com,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Patrick Lai <plai@codeaurora.org>,
linux-kernel@vger.kernel.org,
Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Subject: [PATCH v2 1/6] ASoC: jack: fix snd_soc_codec_set_jack return error
Date: Wed, 2 Aug 2017 19:09:25 +0200 [thread overview]
Message-ID: <20170802170930.26083-2-srinivas.kandagatla@linaro.org> (raw)
In-Reply-To: <20170802170930.26083-1-srinivas.kandagatla@linaro.org>
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
This patch changes the error code returned by snd_soc_codec_set_jack()
from -EINVAL to -ENOTSUPP. The reason to do this is to make the caller
aware that the underlying codec does not support this callback. This can
make the caller write the code to handle this case properly.
Other reason is that -EINVAL is not the correct error to return in this
case anyway.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
sound/soc/soc-jack.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/soc-jack.c b/sound/soc/soc-jack.c
index 7daf21f..42ca9f1 100644
--- a/sound/soc/soc-jack.c
+++ b/sound/soc/soc-jack.c
@@ -36,7 +36,7 @@ int snd_soc_codec_set_jack(struct snd_soc_codec *codec,
if (codec->driver->set_jack)
return codec->driver->set_jack(codec, jack, data);
else
- return -EINVAL;
+ return -ENOTSUPP;
}
EXPORT_SYMBOL_GPL(snd_soc_codec_set_jack);
--
2.9.3
next prev parent reply other threads:[~2017-08-02 17:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-02 17:09 [PATCH v2 0/6] ASoC: codecs: msm8916-wcd-analog: Add support to MBHC srinivas.kandagatla
2017-08-02 17:09 ` srinivas.kandagatla [this message]
2017-08-02 17:09 ` [PATCH v2 2/6] ASoC: codecs: msm8916-wcd-analog: move codec reset to probe srinivas.kandagatla
2017-08-02 17:09 ` [PATCH v2 3/6] ASoC: codecs: msm8916-wcd-analog: get micbias voltage from dt srinivas.kandagatla
2017-08-02 17:09 ` [PATCH v2 4/6] ASoC: codecs: msm8916-wcd-analog: add MBHC support srinivas.kandagatla
2017-08-02 23:33 ` Damien Riegel
2017-08-03 11:11 ` Srinivas Kandagatla
2017-08-03 12:53 ` Damien Riegel
2017-08-03 13:10 ` Srinivas Kandagatla
2017-08-02 17:09 ` [PATCH v2 5/6] ASoC: qcom: apq8016-sbc: Add support to Headset JACK srinivas.kandagatla
2017-08-21 18:33 ` Applied "ASoC: qcom: apq8016-sbc: Add support to Headset JACK" to the asoc tree Mark Brown
2017-08-02 17:09 ` [PATCH v2 6/6] arm64: dts: apq8016-sbc: add mbhc buttons support srinivas.kandagatla
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170802170930.26083-2-srinivas.kandagatla@linaro.org \
--to=srinivas.kandagatla@linaro.org \
--cc=alsa-devel@alsa-project.org \
--cc=bgoswami@codeaurora.org \
--cc=broonie@kernel.org \
--cc=damien.riegel@savoirfairelinux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=plai@codeaurora.org \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®