Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2335d8b2 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ASoC: codec: micb ref count decrement check"

parents 597c8b92 a59daead
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1386,6 +1386,7 @@ static int tasha_micbias_control(struct snd_soc_codec *codec,
			snd_soc_update_bits(codec, micb_reg, 0xC0, 0x80);
		break;
	case MICB_PULLUP_DISABLE:
		if (tasha->pullup_ref[micb_index] > 0)
			tasha->pullup_ref[micb_index]--;
		if ((tasha->pullup_ref[micb_index] == 0) &&
		    (tasha->micb_ref[micb_index] == 0))
@@ -1404,6 +1405,7 @@ static int tasha_micbias_control(struct snd_soc_codec *codec,
					post_dapm_on, &tasha->mbhc);
		break;
	case MICB_DISABLE:
		if (tasha->micb_ref[micb_index] > 0)
			tasha->micb_ref[micb_index]--;
		if ((tasha->micb_ref[micb_index] == 0) &&
		    (tasha->pullup_ref[micb_index] > 0))