mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 20:33:58 -04:00
slim-msm-ngd: Add wake lock to avoid race with suspend and SSR
Add wake lock in SSR up notification handling to avoid race condition between system suspend and SSR up handling sequence which can result in un-clocked access. Change-Id: I246fa70df53b0cb7acdfcadf9cfe2ce01a3bff6b Signed-off-by: Prudhvi Yarlagadda <pyarlaga@codeaurora.org>
This commit is contained in:
parent
5e3eb7b668
commit
f138490407
1 changed files with 4 additions and 0 deletions
|
|
@ -166,6 +166,8 @@ static int ngd_slim_qmi_new_server(struct qmi_handle *hdl,
|
|||
container_of(qmi, struct msm_slim_ctrl, qmi);
|
||||
|
||||
SLIM_INFO(dev, "Slimbus QMI new server event received\n");
|
||||
/* Hold wake lock until notify slaves thread is done */
|
||||
pm_stay_awake(dev->dev);
|
||||
qmi->svc_info.sq_family = AF_QIPCRTR;
|
||||
qmi->svc_info.sq_node = service->node;
|
||||
qmi->svc_info.sq_port = service->port;
|
||||
|
|
@ -1622,6 +1624,7 @@ static int ngd_notify_slaves(void *data)
|
|||
ret = ngd_slim_qmi_svc_event_init(&dev->qmi);
|
||||
if (ret) {
|
||||
pr_err("Slimbus QMI service registration failed:%d\n", ret);
|
||||
pm_relax(dev->dev);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
@ -1662,6 +1665,7 @@ static int ngd_notify_slaves(void *data)
|
|||
}
|
||||
mutex_unlock(&ctrl->m_ctrl);
|
||||
}
|
||||
pm_relax(dev->dev);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue