Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2810d168 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "cnss2: Call mhi_device_get_sync() if timeout requested is 0"

parents cb757bc5 f0d5c00c
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -3064,7 +3064,14 @@ int cnss_pci_force_wake_request_sync(struct device *dev, int timeout_us)
	if (test_bit(CNSS_DEV_ERR_NOTIFY, &plat_priv->driver_state))
		return -EAGAIN;

	return mhi_device_get_sync_atomic(mhi_ctrl->mhi_dev, timeout_us);
	if (timeout_us) {
		/* Busy wait for timeout_us */
		return mhi_device_get_sync_atomic(mhi_ctrl->mhi_dev,
						  timeout_us);
	} else {
		/* Sleep wait for mhi_ctrl->timeout_ms */
		return mhi_device_get_sync(mhi_ctrl->mhi_dev, MHI_VOTE_DEVICE);
	}
}
EXPORT_SYMBOL(cnss_pci_force_wake_request_sync);