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

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

Merge "slim-msm-ngd: Prevent race condition for suspend and SSR"

parents cf526004 0455a225
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -2111,7 +2111,18 @@ static int ngd_slim_runtime_suspend(struct device *device)
	int ret = 0;

	mutex_lock(&dev->tx_lock);
	if (dev->qmi.handle != NULL) {
		ret = ngd_slim_power_down(dev);
	} else {
		if (dev->state == MSM_CTRL_DOWN)
			SLIM_INFO(dev, "SB rt suspend in SSR: %d\n",
								dev->state);
		else
			SLIM_INFO(dev, "SB rt suspend bad state: %d\n",
								dev->state);
		mutex_unlock(&dev->tx_lock);
		return ret;
	}
	if (ret && ret != -EBUSY)
		SLIM_INFO(dev, "slim resource not idle:%d\n", ret);
	if (!ret || ret == -ETIMEDOUT)