]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: mediatek: Reduce repititive code on mtk_regmap_update_bits.
authorPi-Hsun Shih <pihsun@chromium.org>
Wed, 6 Mar 2019 09:09:03 +0000 (17:09 +0800)
committerMark Brown <broonie@kernel.org>
Tue, 19 Mar 2019 12:51:20 +0000 (12:51 +0000)
commite0ca0bb4ac5254f134825099eaaf3022b9888d98
tree0f5b12ac0232ea92dd06c94dd474e62d79151d45
parentf0dc4b5fc9cad7b69414602d989a40adbe5235f3
ASoC: mediatek: Reduce repititive code on mtk_regmap_update_bits.

Change the signature of mtk_regmap_update_bits to also take a shift, and
warn when reg >= 0 but shift < 0. This reduce the code repetition
on the calling side, and prevent future UBSAN warning when some of the
xxx_shift and xxx_reg are both set to -1.

Signed-off-by: Pi-Hsun Shih <pihsun@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/mediatek/common/mtk-afe-fe-dai.c