diff options
author | Linux Build Service Account <lnxbuild@quicinc.com> | 2017-08-29 01:40:55 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-08-29 01:40:55 -0700 |
commit | 2ed94ee2e31b1e9cebf04c659c3cb5152e87e5d3 (patch) | |
tree | d585cae7d2db9c740f34238a0a0d8e82921bfc5c | |
parent | 60caee17253e38a03aef40935c4f8de5a2573454 (diff) | |
parent | 914700383f7450ab594c3fd017494dc8b35e9899 (diff) |
Merge "spi: spi_qsd: Prevent deadlock while runtime pm is disabled"
-rw-r--r-- | drivers/spi/spi_qsd.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/spi/spi_qsd.c b/drivers/spi/spi_qsd.c index 4499dd35f2dd..da58f19dd6e6 100644 --- a/drivers/spi/spi_qsd.c +++ b/drivers/spi/spi_qsd.c @@ -1827,14 +1827,16 @@ static int msm_spi_setup(struct spi_device *spi) mb(); if (dd->pdata->is_shared) put_local_resources(dd); - /* Counter-part of system-resume when runtime-pm is not enabled. */ - if (!pm_runtime_enabled(dd->dev)) - msm_spi_pm_suspend_runtime(dd->dev); no_resources: mutex_unlock(&dd->core_lock); - pm_runtime_mark_last_busy(dd->dev); - pm_runtime_put_autosuspend(dd->dev); + /* Counter-part of system-resume when runtime-pm is not enabled. */ + if (!pm_runtime_enabled(dd->dev)) { + msm_spi_pm_suspend_runtime(dd->dev); + } else { + pm_runtime_mark_last_busy(dd->dev); + pm_runtime_put_autosuspend(dd->dev); + } err_setup_exit: return rc; |