summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManoj Prabhu B <bmanoj@codeaurora.org>2017-05-10 16:36:52 +0530
committerManoj Prabhu B <bmanoj@codeaurora.org>2017-05-11 12:32:14 +0530
commit3333335b97da0b7a14d357bc3ee22ff8d67aabfd (patch)
treef9fa34713c1f041dcc0c06d29fd63cda21eb4e31
parent3d82d66409abb91539bcb9d1f343fcb9d583f2b4 (diff)
diag: Validate proper mdlog session for a PD
The patch updates the mdlog session to be checked based on the active user PD logging session. CRs-Fixed: 2045080 Change-Id: Ieac3301545970aac91efa5a6f66c44530ff251f3 Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
-rw-r--r--drivers/char/diag/diag_mux.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/char/diag/diag_mux.c b/drivers/char/diag/diag_mux.c
index 39f4b08d9b0a..d6f6ea7af8ea 100644
--- a/drivers/char/diag/diag_mux.c
+++ b/drivers/char/diag/diag_mux.c
@@ -153,8 +153,13 @@ int diag_mux_write(int proc, unsigned char *buf, int len, int ctx)
upd = PERIPHERAL_CDSP;
break;
case UPD_WLAN:
+ if (!driver->num_pd_session)
+ upd = PERIPHERAL_MODEM;
+ break;
case UPD_AUDIO:
case UPD_SENSORS:
+ if (!driver->num_pd_session)
+ upd = PERIPHERAL_LPASS;
break;
default:
pr_err("diag: invalid pd ctxt= %d\n", upd);