ASoC: rt298: fix boolean tests

Reported by Coccinelle:

sound/soc/codecs/rt298.c:992:6-8: WARNING: Comparison to bool
sound/soc/codecs/rt298.c:995:6-9: WARNING: Comparison to bool
sound/soc/codecs/rt298.c:317:5-7: WARNING: Comparison to bool
sound/soc/codecs/rt298.c:320:5-8: WARNING: Comparison to bool
sound/soc/codecs/rt298.c:348:5-7: WARNING: Comparison to bool
sound/soc/codecs/rt298.c:351:5-8: WARNING: Comparison to bool

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Pierre-Louis Bossart 2019-01-04 20:02:36 -06:00 committed by Mark Brown
parent b8e022e83b
commit f0627d0060
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
1 changed files with 6 additions and 6 deletions

View File

@ -314,10 +314,10 @@ static void rt298_jack_detect_work(struct work_struct *work)
if (rt298_jack_detect(rt298, &hp, &mic) < 0) if (rt298_jack_detect(rt298, &hp, &mic) < 0)
return; return;
if (hp == true) if (hp)
status |= SND_JACK_HEADPHONE; status |= SND_JACK_HEADPHONE;
if (mic == true) if (mic)
status |= SND_JACK_MICROPHONE; status |= SND_JACK_MICROPHONE;
snd_soc_jack_report(rt298->jack, status, snd_soc_jack_report(rt298->jack, status,
@ -345,10 +345,10 @@ int rt298_mic_detect(struct snd_soc_component *component, struct snd_soc_jack *j
regmap_update_bits(rt298->regmap, RT298_IRQ_CTRL, 0x2, 0x2); regmap_update_bits(rt298->regmap, RT298_IRQ_CTRL, 0x2, 0x2);
rt298_jack_detect(rt298, &hp, &mic); rt298_jack_detect(rt298, &hp, &mic);
if (hp == true) if (hp)
status |= SND_JACK_HEADPHONE; status |= SND_JACK_HEADPHONE;
if (mic == true) if (mic)
status |= SND_JACK_MICROPHONE; status |= SND_JACK_MICROPHONE;
snd_soc_jack_report(rt298->jack, status, snd_soc_jack_report(rt298->jack, status,
@ -989,10 +989,10 @@ static irqreturn_t rt298_irq(int irq, void *data)
regmap_update_bits(rt298->regmap, RT298_IRQ_CTRL, 0x1, 0x1); regmap_update_bits(rt298->regmap, RT298_IRQ_CTRL, 0x1, 0x1);
if (ret == 0) { if (ret == 0) {
if (hp == true) if (hp)
status |= SND_JACK_HEADPHONE; status |= SND_JACK_HEADPHONE;
if (mic == true) if (mic)
status |= SND_JACK_MICROPHONE; status |= SND_JACK_MICROPHONE;
snd_soc_jack_report(rt298->jack, status, snd_soc_jack_report(rt298->jack, status,