]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: cs42l42: Simplify reporting of jack unplug
authorRichard Fitzgerald <rf@opensource.cirrus.com>
Tue, 16 Nov 2021 16:39:00 +0000 (16:39 +0000)
committerMark Brown <broonie@kernel.org>
Wed, 17 Nov 2021 13:04:45 +0000 (13:04 +0000)
commitb345591e8deb6a466f3ce266eef6d03c1b5c02fe
tree289ca86918c419bfc0f14de707905840f0c58eaf
parent199fd5eeab2a1f3a2f4f2f8ee1f254c40656fa71
ASoC: cs42l42: Simplify reporting of jack unplug

When reporting a jack unplug there's no need to make the reported
flags conditional on which flags were reported during the plug
event. It's perfectly safe to report all flags and buttons as
not-present and let the higher code filter for changes.

There's also no need to make two separate snd_soc_jack_report()
calls for presence flags and button flags. It can all be done in
one report.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20211116163901.45390-4-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/cs42l42.c