From d898a57ffdd51b76bba037fe6252be347decdc97 Mon Sep 17 00:00:00 2001 From: Eric Rosas Date: Fri, 10 Feb 2023 16:01:03 -0800 Subject: [PATCH] asoc: codec: Use regmap_update_bits on wsa884x post IRQ Change snd_soc_component_update_bits to regmap_update_bits because wsa884x may not be initalized post IRQ. Change-Id: I3018c680e8b2db346e5acaefc330a5af98150cf2 Signed-off-by: Eric Rosas --- asoc/codecs/wsa884x/wsa884x.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/asoc/codecs/wsa884x/wsa884x.c b/asoc/codecs/wsa884x/wsa884x.c index 97b98176cd..731d4649cc 100644 --- a/asoc/codecs/wsa884x/wsa884x.c +++ b/asoc/codecs/wsa884x/wsa884x.c @@ -208,16 +208,13 @@ static int wsa884x_handle_post_irq(void *data) u32 sts1 = 0, sts2 = 0; int retry = WSA884X_IRQ_RETRY; - struct snd_soc_component *component = NULL; - if (!wsa884x) return IRQ_NONE; - component = wsa884x->component; if (!wsa884x->pa_mute) { do { wsa884x->pa_mute = 0; - snd_soc_component_update_bits(component, + regmap_update_bits(wsa884x->regmap, REG_FIELD_VALUE(PA_FSM_EN, GLOBAL_PA_EN, 0x01)); usleep_range(1000, 1100); @@ -231,7 +228,7 @@ static int wsa884x_handle_post_irq(void *data) if (wsa884x->swr_slave->slave_irq_pending) { pr_debug("%s: IRQ retries left: %0d\n", __func__, retry); - snd_soc_component_update_bits(component, + regmap_update_bits(wsa884x->regmap, REG_FIELD_VALUE(PA_FSM_EN, GLOBAL_PA_EN, 0x00)); wsa884x->pa_mute = 1; if (retry--)