提交 1967c128 编写于 作者: J Johan Hovold 提交者: Kalle Valo

wcn36xx: fix iris child-node lookup

Fix child-node lookup during probe, which ended up searching the whole
device tree depth-first starting at the parent rather than just matching
on its children.

To make things worse, the parent mmio node was also prematurely freed.

Fixes: fd52bdae ("wcn36xx: Disable 5GHz for wcn3620")
Cc: Loic Poulain <loic.poulain@linaro.org>
Signed-off-by: NJohan Hovold <johan@kernel.org>
Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
上级 307aeb31
...@@ -1233,7 +1233,7 @@ static int wcn36xx_platform_get_resources(struct wcn36xx *wcn, ...@@ -1233,7 +1233,7 @@ static int wcn36xx_platform_get_resources(struct wcn36xx *wcn,
} }
/* External RF module */ /* External RF module */
iris_node = of_find_node_by_name(mmio_node, "iris"); iris_node = of_get_child_by_name(mmio_node, "iris");
if (iris_node) { if (iris_node) {
if (of_device_is_compatible(iris_node, "qcom,wcn3620")) if (of_device_is_compatible(iris_node, "qcom,wcn3620"))
wcn->rf_id = RF_IRIS_WCN3620; wcn->rf_id = RF_IRIS_WCN3620;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册