diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2016-10-25 18:31:04 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-10-25 18:31:04 -0700 |
| commit | 9f8e4e930a876f35026227b7849f6da27bde8703 (patch) | |
| tree | dcd27954d6a7f08d0d64df2c1a1c1b44de8378b8 | |
| parent | cdb01bf4660c1cf94d23e60d6b54916f683f99c6 (diff) | |
| parent | b51f826e9f3902e6e4d406ad802b39183bbd5226 (diff) | |
Merge "soc: qcom: use interruptible wait_for_completion API"
| -rw-r--r-- | drivers/soc/qcom/wcd-dsp-glink.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/soc/qcom/wcd-dsp-glink.c b/drivers/soc/qcom/wcd-dsp-glink.c index 92cdadef715d..97d922fa5724 100644 --- a/drivers/soc/qcom/wcd-dsp-glink.c +++ b/drivers/soc/qcom/wcd-dsp-glink.c @@ -216,9 +216,9 @@ static bool wdsp_glink_notify_rx_intent_req(void *handle, const void *priv, mutex_lock(&ch->mutex); rc = glink_queue_rx_intent(ch->handle, ch, req_size); - if (IS_ERR_VALUE(ret)) { - dev_err(wpriv->dev, "%s: Failed to queue rx intent\n", - __func__); + if (IS_ERR_VALUE(rc)) { + dev_err(wpriv->dev, "%s: Failed to queue rx intent, rc = %d\n", + __func__, rc); mutex_unlock(&ch->mutex); goto done; } @@ -659,10 +659,13 @@ static ssize_t wdsp_glink_read(struct file *file, char __user *buf, count = WDSP_MAX_READ_SIZE; } /* - * This is unblocked only from glink rx notification callback - * or from flush API. + * Complete signal has given from glink rx notification callback + * or from flush API. Also use interruptible wait_for_completion API + * to allow the system to go in suspend. */ - wait_for_completion(&wpriv->rsp_complete); + ret = wait_for_completion_interruptible(&wpriv->rsp_complete); + if (ret) + goto done; mutex_lock(&wpriv->rsp_mutex); if (wpriv->rsp_cnt) { |
