diff options
author | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2019-11-28 11:25:31 +0100 |
---|---|---|
committer | Stephen Boyd <sboyd@kernel.org> | 2019-12-16 18:56:18 +0100 |
commit | 6956eb33abb5deab2cd916b4c31226b57736bc3c (patch) | |
tree | bc5073c9253c9c2e6e899ee55186c8de98ffac81 /drivers/clk/at91/sama5d4.c | |
parent | Merge tag 'imx-clk-fixes-5.5' of git://git.kernel.org/pub/scm/linux/kernel/gi... (diff) | |
download | linux-6956eb33abb5deab2cd916b4c31226b57736bc3c.tar.xz linux-6956eb33abb5deab2cd916b4c31226b57736bc3c.zip |
clk: at91: fix possible deadlock
Lockdep warns about a possible circular locking dependency because using
syscon_node_to_regmap() will make the created regmap get and enable the
first clock it can parse from the device tree. This clock is not needed to
access the registers and should not be enabled at that time.
Use the recently introduced device_node_to_regmap to solve that as it looks
up the regmap in the same list but doesn't care about the clocks.
Reported-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lkml.kernel.org/r/20191128102531.817549-1-alexandre.belloni@bootlin.com
Tested-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk/at91/sama5d4.c')
-rw-r--r-- | drivers/clk/at91/sama5d4.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/clk/at91/sama5d4.c b/drivers/clk/at91/sama5d4.c index 25b156d4e645..a6dee4a3b6e4 100644 --- a/drivers/clk/at91/sama5d4.c +++ b/drivers/clk/at91/sama5d4.c @@ -136,7 +136,7 @@ static void __init sama5d4_pmc_setup(struct device_node *np) return; mainxtal_name = of_clk_get_parent_name(np, i); - regmap = syscon_node_to_regmap(np); + regmap = device_node_to_regmap(np); if (IS_ERR(regmap)) return; |