mhi: core: do not toggle PCIe low power mode in sleeping context

Do not toggle PCIe low power mode in sleeping context as the
calls can grab a mutex.

Change-Id: I12eed6a01d80b36412ec3e18af382a031a9d108d
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
This commit is contained in:
Bhaumik Bhatt 2020-01-16 16:21:16 -08:00 committed by Gerrit - the friendly Code Review server
parent d8c5bb77e0
commit b053a4bc45

View File

@ -2493,6 +2493,7 @@ int mhi_get_remote_time_sync(struct mhi_device *mhi_dev,
ret = -EIO;
goto error_invalid_state;
}
read_unlock_bh(&mhi_cntrl->pm_lock);
/* disable link level low power modes */
ret = mhi_cntrl->lpm_disable(mhi_cntrl, mhi_cntrl->priv_data);
@ -2515,6 +2516,7 @@ int mhi_get_remote_time_sync(struct mhi_device *mhi_dev,
mhi_cntrl->lpm_enable(mhi_cntrl, mhi_cntrl->priv_data);
read_lock_bh(&mhi_cntrl->pm_lock);
error_invalid_state:
mhi_cntrl->wake_put(mhi_cntrl, false);
read_unlock_bh(&mhi_cntrl->pm_lock);