]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - 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
1 From 33ec6dbc5a02677509d97fe36cd2105753f0f0ea Mon Sep 17 00:00:00 2001
2 From: Johan Hovold <johan@kernel.org>
3 Date: Sat, 11 Nov 2017 17:29:29 +0100
4 Subject: clk: ti: dra7-atl-clock: fix child-node lookups
5
6 From: Johan Hovold <johan@kernel.org>
7
8 commit 33ec6dbc5a02677509d97fe36cd2105753f0f0ea upstream.
9
10 Fix child node-lookup during probe, which ended up searching the whole
11 device tree depth-first starting at parent rather than just matching on
12 its children.
13
14 Note that the original premature free of the parent node has already
15 been fixed separately, but that fix was apparently never backported to
16 stable.
17
18 Fixes: 9ac33b0ce81f ("CLK: TI: Driver for DRA7 ATL (Audio Tracking Logic)")
19 Fixes: 660e15519399 ("clk: ti: dra7-atl-clock: Fix of_node reference counting")
20 Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
21 Signed-off-by: Johan Hovold <johan@kernel.org>
22 Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
23 Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
24 Signed-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);