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>
This commit is contained in:
Manoj Prabhu B 2017-05-10 16:36:52 +05:30
parent 3d82d66409
commit 3333335b97

View file

@ -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);