summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/rt5640.c
diff options
context:
space:
mode:
authorDmitry Osipenko <digetx@gmail.com>2021-08-02 21:52:58 +0300
committerMark Brown <broonie@kernel.org>2021-08-05 22:18:16 +0300
commit585fb31c2c3aad38a5add009171d7e3277b76d45 (patch)
tree771da4812033edc5fe63d358faf8c890403726a4 /sound/soc/codecs/rt5640.c
parentbcee7ed09b8e70b65d5c04f5d1acd2cf4213c2f3 (diff)
downloadlinux-585fb31c2c3aad38a5add009171d7e3277b76d45.tar.xz
ASoC: rt5640: Silence warning message about missing interrupt
Interrupt is optional for the RT5640 codec. Nexus 7 doesn't use interrupt, this results in a noisy warning message that looks like a error condition. Make interrupt explicitly optional to silence the message, use modern IRQF_NO_AUTOEN flag and correct the reg[q]uest typo in the message. Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Link: https://lore.kernel.org/r/20210802185258.1881-1-digetx@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/rt5640.c')
-rw-r--r--sound/soc/codecs/rt5640.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/sound/soc/codecs/rt5640.c b/sound/soc/codecs/rt5640.c
index 9523f4b5c800..0f5087a7644b 100644
--- a/sound/soc/codecs/rt5640.c
+++ b/sound/soc/codecs/rt5640.c
@@ -2836,15 +2836,18 @@ static int rt5640_i2c_probe(struct i2c_client *i2c,
if (ret)
return ret;
- ret = devm_request_irq(&i2c->dev, rt5640->irq, rt5640_irq,
- IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING
- | IRQF_ONESHOT, "rt5640", rt5640);
- if (ret == 0) {
- /* Gets re-enabled by rt5640_set_jack() */
- disable_irq(rt5640->irq);
+ if (rt5640->irq) {
+ /* enabled by rt5640_set_jack() */
+ ret = devm_request_irq(&i2c->dev, rt5640->irq, rt5640_irq,
+ IRQF_TRIGGER_RISING | IRQF_NO_AUTOEN |
+ IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
+ "rt5640", rt5640);
+ if (ret) {
+ dev_err(&i2c->dev, "Failed to request IRQ %d: %d\n",
+ rt5640->irq, ret);
+ return ret;
+ }
} else {
- dev_warn(&i2c->dev, "Failed to reguest IRQ %d: %d\n",
- rt5640->irq, ret);
rt5640->irq = -ENXIO;
}