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

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

Merge "cnss2: Avoid race condition between time sync and system suspend"

parents b37f5eae 542be884
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1685,7 +1685,9 @@ static void cnss_pci_time_sync_work_hdlr(struct work_struct *work)
	if (cnss_pci_pm_runtime_get_sync(pci_priv, RTPM_ID_CNSS) < 0)
		goto runtime_pm_put;

	mutex_lock(&pci_priv->bus_lock);
	cnss_pci_update_timestamp(pci_priv);
	mutex_unlock(&pci_priv->bus_lock);
	schedule_delayed_work(&pci_priv->time_sync_work,
			      msecs_to_jiffies(time_sync_period_ms));

@@ -2794,7 +2796,9 @@ static int cnss_pci_suspend(struct device *dev)
		goto clear_flag;

	if (!pci_priv->disable_pc) {
		mutex_lock(&pci_priv->bus_lock);
		ret = cnss_pci_suspend_bus(pci_priv);
		mutex_unlock(&pci_priv->bus_lock);
		if (ret)
			goto resume_driver;
	}