@@ -309,16 +309,17 @@ static int s3c24xx_dclk_probe(struct platform_device *pdev)
goto err_clk_register;
}
- ret = clk_hw_register_clkdev(clk_table[MUX_DCLK0], "dclk0", NULL);
+ ret = devm_clk_hw_register_clkdev(&pdev->dev, clk_table[MUX_DCLK0],
+ "dclk0", NULL);
if (!ret)
- ret = clk_hw_register_clkdev(clk_table[MUX_DCLK1], "dclk1",
- NULL);
+ ret = devm_clk_hw_register_clkdev(&pdev->dev,
+ clk_table[MUX_DCLK1], "dclk1", NULL);
if (!ret)
- ret = clk_hw_register_clkdev(clk_table[MUX_CLKOUT0],
- "clkout0", NULL);
+ ret = devm_clk_hw_register_clkdev(&pdev->dev,
+ clk_table[MUX_CLKOUT0], "clkout0", NULL);
if (!ret)
- ret = clk_hw_register_clkdev(clk_table[MUX_CLKOUT1],
- "clkout1", NULL);
+ ret = devm_clk_hw_register_clkdev(&pdev->dev,
+ clk_table[MUX_CLKOUT1], "clkout1", NULL);
if (ret) {
dev_err(&pdev->dev, "failed to register aliases, %d\n", ret);
goto err_clk_register;
Use devm variant of clkdev lookup registration in order to avoid clkdev lookup leak at device remove. Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> --- drivers/clk/samsung/clk-s3c2410-dclk.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-)