]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.4.103/clk-ti-dra7-atl-clock-fix-child-node-lookups.patch
4.14-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.4.103 / clk-ti-dra7-atl-clock-fix-child-node-lookups.patch
CommitLineData
5f59e284
GKH
1From 33ec6dbc5a02677509d97fe36cd2105753f0f0ea Mon Sep 17 00:00:00 2001
2From: Johan Hovold <johan@kernel.org>
3Date: Sat, 11 Nov 2017 17:29:29 +0100
4Subject: clk: ti: dra7-atl-clock: fix child-node lookups
5
6From: Johan Hovold <johan@kernel.org>
7
8commit 33ec6dbc5a02677509d97fe36cd2105753f0f0ea upstream.
9
10Fix child node-lookup during probe, which ended up searching the whole
11device tree depth-first starting at parent rather than just matching on
12its children.
13
14Note that the original premature free of the parent node has already
15been fixed separately, but that fix was apparently never backported to
16stable.
17
18Fixes: 9ac33b0ce81f ("CLK: TI: Driver for DRA7 ATL (Audio Tracking Logic)")
19Fixes: 660e15519399 ("clk: ti: dra7-atl-clock: Fix of_node reference counting")
20Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
21Signed-off-by: Johan Hovold <johan@kernel.org>
22Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
23Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
24Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
25
26---
27 drivers/clk/ti/clk-dra7-atl.c | 3 +--
28 1 file changed, 1 insertion(+), 2 deletions(-)
29
30--- a/drivers/clk/ti/clk-dra7-atl.c
31+++ b/drivers/clk/ti/clk-dra7-atl.c
32@@ -265,8 +265,7 @@ static int of_dra7_atl_clk_probe(struct
33
34 /* Get configuration for the ATL instances */
35 snprintf(prop, sizeof(prop), "atl%u", i);
36- of_node_get(node);
37- cfg_node = of_find_node_by_name(node, prop);
38+ cfg_node = of_get_child_by_name(node, prop);
39 if (cfg_node) {
40 ret = of_property_read_u32(cfg_node, "bws",
41 &cdesc->bws);