diag: Proper update of logging mode
The patch properly updates the logging mode after an user PD
on-device logging session is killed preventing a mutex deadlock
and thereby safe ODL session clearing.
CRs-Fixed: 2154183
Change-Id: I8451ed3869f5b75860684d5ef4119befd0cb2723
Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
diff --git a/drivers/char/diag/diag_mux.c b/drivers/char/diag/diag_mux.c
index e65b493..c31998c 100644
--- a/drivers/char/diag/diag_mux.c
+++ b/drivers/char/diag/diag_mux.c
@@ -205,6 +205,8 @@
new_mask = ~(*peripheral_mask) & diag_mux->mux_mask;
if (new_mask != DIAG_CON_NONE)
*req_mode = DIAG_MULTI_MODE;
+ if (new_mask == DIAG_CON_ALL)
+ *req_mode = DIAG_MEMORY_DEVICE_MODE;
break;
case DIAG_MEMORY_DEVICE_MODE:
new_mask = (*peripheral_mask) | diag_mux->mux_mask;