d3d1ea17f5a520b22856198c56bd23dcb69e8248
[openwrt/staging/blogic.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 diff --git a/drivers/clk/qcom/krait-cc.c b/drivers/clk/qcom/krait-cc.c
18 index e91275663973..33a78b7de0bd 100644
19 --- a/drivers/clk/qcom/krait-cc.c
20 +++ b/drivers/clk/qcom/krait-cc.c
21 @@ -64,7 +64,7 @@ static int krait_notifier_register(struct device *dev, struct clk *clk,
22 int ret = 0;
23
24 mux->clk_nb.notifier_call = krait_notifier_cb;
25 - ret = clk_notifier_register(clk, &mux->clk_nb);
26 + ret = devm_clk_notifier_register(dev, clk, &mux->clk_nb);
27 if (ret)
28 dev_err(dev, "failed to register clock notifier: %d\n", ret);
29
30 --
31 2.37.2
32