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

Commit fcc1183f authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "coresight: Remove recursive mutex usage" into msm-4.9

parents abc9d89c e69e5040
Loading
Loading
Loading
Loading
+10 −8
Original line number Diff line number Diff line
@@ -578,27 +578,29 @@ int coresight_enable(struct coresight_device *csdev)
}
EXPORT_SYMBOL_GPL(coresight_enable);

void coresight_disable(struct coresight_device *csdev)
static void __coresight_disable(struct coresight_device *csdev)
{
	int  ret;

	mutex_lock(&coresight_mutex);

	ret = coresight_validate_source(csdev, __func__);
	if (ret)
		goto out;
		return;

	if (!csdev->enable)
		goto out;
		return;

	if (csdev->node == NULL)
		goto out;
		return;

	coresight_disable_source(csdev);
	coresight_disable_path(csdev->node->path);
	coresight_release_path(csdev, csdev->node->path);
}

out:
void coresight_disable(struct coresight_device *csdev)
{
	mutex_lock(&coresight_mutex);
	__coresight_disable(csdev);
	mutex_unlock(&coresight_mutex);
}
EXPORT_SYMBOL_GPL(coresight_disable);
@@ -904,7 +906,7 @@ static ssize_t reset_source_sink_store(struct bus_type *bus,
		csdev = coresight_get_source(cspath->path);
		if (!csdev)
			continue;
		coresight_disable(csdev);
		__coresight_disable(csdev);
	}

	mutex_unlock(&coresight_mutex);