65c1fc17f2127976ee6fa769760ba999f3ff6989
[openwrt/staging/stintel.git] /
1 From 3198106a99e73dbc4c02bd5128cec0997c73af82 Mon Sep 17 00:00:00 2001
2 From: Christian Marangi <ansuelsmth@gmail.com>
3 Date: Tue, 8 Nov 2022 22:58:27 +0100
4 Subject: [PATCH 1/6] clk: qcom: krait-cc: use devm variant for clk notifier
5 register
6
7 Use devm variant for clk notifier register and correctly handle free
8 resource on driver remove.
9
10 Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
11 Signed-off-by: Bjorn Andersson <andersson@kernel.org>
12 Link: https://lore.kernel.org/r/20221108215827.30475-1-ansuelsmth@gmail.com
13 ---
14 drivers/clk/qcom/krait-cc.c | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
16
17 --- a/drivers/clk/qcom/krait-cc.c
18 +++ b/drivers/clk/qcom/krait-cc.c
19 @@ -62,7 +62,7 @@ static int krait_notifier_register(struc
20 int ret = 0;
21
22 mux->clk_nb.notifier_call = krait_notifier_cb;
23 - ret = clk_notifier_register(clk, &mux->clk_nb);
24 + ret = devm_clk_notifier_register(dev, clk, &mux->clk_nb);
25 if (ret)
26 dev_err(dev, "failed to register clock notifier: %d\n", ret);
27