From 3333335b97da0b7a14d357bc3ee22ff8d67aabfd Mon Sep 17 00:00:00 2001 From: Manoj Prabhu B Date: Wed, 10 May 2017 16:36:52 +0530 Subject: 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 --- drivers/char/diag/diag_mux.c | 5 +++++ 1 file changed, 5 insertions(+) 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); -- cgit v1.2.3