Commit 585fb31c authored by Dmitry Osipenko's avatar Dmitry Osipenko Committed by Mark Brown

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: default avatarDmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/20210802185258.1881-1-digetx@gmail.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent bcee7ed0
...@@ -2836,15 +2836,18 @@ static int rt5640_i2c_probe(struct i2c_client *i2c, ...@@ -2836,15 +2836,18 @@ static int rt5640_i2c_probe(struct i2c_client *i2c,
if (ret) if (ret)
return ret; return ret;
ret = devm_request_irq(&i2c->dev, rt5640->irq, rt5640_irq, if (rt5640->irq) {
IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING /* enabled by rt5640_set_jack() */
| IRQF_ONESHOT, "rt5640", rt5640); ret = devm_request_irq(&i2c->dev, rt5640->irq, rt5640_irq,
if (ret == 0) { IRQF_TRIGGER_RISING | IRQF_NO_AUTOEN |
/* Gets re-enabled by rt5640_set_jack() */ IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
disable_irq(rt5640->irq); "rt5640", rt5640);
if (ret) {
dev_err(&i2c->dev, "Failed to request IRQ %d: %d\n",
rt5640->irq, ret);
return ret;
}
} else { } else {
dev_warn(&i2c->dev, "Failed to reguest IRQ %d: %d\n",
rt5640->irq, ret);
rt5640->irq = -ENXIO; rt5640->irq = -ENXIO;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment