ALSA: hda: Use regcache_reg_cached() rather than open coding
authorMark Brown <broonie@kernel.org>
Mon, 17 Jul 2023 20:33:05 +0000 (21:33 +0100)
committerMark Brown <broonie@kernel.org>
Tue, 18 Jul 2023 14:05:12 +0000 (15:05 +0100)
commit99aae70551f99536936438bbcfc562df69eeb79c
tree75ab82aa72fd2070b4b1f993196caf89734764d5
parentd881ee5a872fd539a8c693e4c8656b9343c9aae0
ALSA: hda: Use regcache_reg_cached() rather than open coding

The HDA driver intentionally drops repeated writes to registers in some
circumstances, beyond the suppression of noop writes that regmap does in
regmap_update_bits(). It does this by checking if the register is cached
before doing a regmap_update_bits(), now we have an API for querying this
directly use it directly rather than trying a read in cache only mode
making the code a little clearer.

Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230717-regmap-cache-check-v1-3-73ef688afae3@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/hda/hdac_regmap.c