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

Commit 74e9783f authored by Naveen Kaje's avatar Naveen Kaje
Browse files

msm_serial_hs: ensure clock_count follows clk_state



Unbalanced clock votes can cause inconsitencies
in the clk_count and clk_state. Ensure consistency during
shutdown so that the subsequent operations are not affected

CRs-Fixed: 713831
Change-Id: I7b20a56f37e84d7dbfd5d7221c29cfdb18ce3adb
Signed-off-by: default avatarNaveen Kaje <nkaje@codeaurora.org>
parent cc95eee0
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -3421,6 +3421,7 @@ static void msm_hs_shutdown(struct uart_port *uport)
	msm_hs_resource_unvote(msm_uport);
	rc = atomic_read(&msm_uport->clk_count);
	if (rc) {
		atomic_set(&msm_uport->clk_count, 1);
		MSM_HS_WARN("%s(): removing extra vote\n", __func__);
		msm_hs_resource_unvote(msm_uport);
	}