Skip to content

Commit 54e020b

Browse files
AaronDotbebarino
authored andcommitted
clk: clk-loongson2: Switch to use devm_clk_hw_register_fixed_rate_parent_data()
Since commit 706ae64 ("clk: fixed-rate: add devm_clk_hw_register_fixed_rate_parent_data()"), we can use the devm_clk_hw_register_fixed_rate_parent_data() helper and from then on there is no need to manually unregister the fixed rate hw. Since clk_hw_unregister_fixed_rate() was not called before, we also fix the memory leak that was present. Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Link: https://lore.kernel.org/r/8733a7485619bdb791de25201a3d7984d1849c9f.1736856470.git.zhoubinbin@loongson.cn Signed-off-by: Stephen Boyd <sboyd@kernel.org>
1 parent 838c0a4 commit 54e020b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/clk/clk-loongson2.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,8 +335,8 @@ static int loongson2_clk_probe(struct platform_device *pdev)
335335
&clp->clk_lock);
336336
break;
337337
case CLK_TYPE_FIXED:
338-
hw = clk_hw_register_fixed_rate_parent_data(dev, p->name, pdata,
339-
0, p->fixed_rate);
338+
hw = devm_clk_hw_register_fixed_rate_parent_data(dev, p->name, pdata,
339+
0, p->fixed_rate);
340340
break;
341341
default:
342342
return dev_err_probe(dev, -EINVAL, "Invalid clk type\n");

0 commit comments

Comments
 (0)