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

Commit b42e2119 authored by Jordan Crouse's avatar Jordan Crouse Committed by Jeremy Gebben
Browse files

msm: kgsl: use of_find_node_by_name() instead of rolling our own



For some reason we thought it would be a good idea to make a weak
version of of_find_node_by_name() instead of actually using
of_find_node_by_name().

Change-Id: Ic0dedbad317092aaa0922c4ffaca7ca7e83398e2
Signed-off-by: default avatarJordan Crouse <jcrouse@codeaurora.org>
parent d82fe065
Loading
Loading
Loading
Loading
+1 −14
Original line number Diff line number Diff line
@@ -756,26 +756,13 @@ static const struct of_device_id adreno_match_table[] = {
	{}
};

static struct device_node *adreno_of_find_subnode(struct device_node *parent,
	const char *name)
{
	struct device_node *child;

	for_each_child_of_node(parent, child) {
		if (of_device_is_compatible(child, name))
			return child;
	}

	return NULL;
}

static int adreno_of_get_pwrlevels(struct device_node *parent,
	struct kgsl_device_platform_data *pdata)
{
	struct device_node *node, *child;
	int ret = -EINVAL;

	node = adreno_of_find_subnode(parent, "qcom,gpu-pwrlevels");
	node = of_find_node_by_name(parent, "qcom,gpu-pwrlevels");

	if (node == NULL) {
		KGSL_CORE_ERR("Unable to find 'qcom,gpu-pwrlevels'\n");