diff options
author | Axel Lin <axel.lin@ingics.com> | 2015-07-16 16:15:53 +0200 |
---|---|---|
committer | Stephen Boyd <sboyd@codeaurora.org> | 2015-07-28 20:58:48 +0200 |
commit | 5c757456c16ce056a40a120e63235bc00c94ee7f (patch) | |
tree | 2bcf58e75a4622f7870344b53e1a51407150bb43 | |
parent | clk: s2mps11: Simplify s2mps11_clk_probe unwind paths (diff) | |
download | linux-5c757456c16ce056a40a120e63235bc00c94ee7f.tar.xz linux-5c757456c16ce056a40a120e63235bc00c94ee7f.zip |
clk: twl6040: Convert to use devm_clk_register
Use devm_clk_register() to simplify the code by removing
twl6040_clk_remove().
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
-rw-r--r-- | drivers/clk/clk-twl6040.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/clk/clk-twl6040.c b/drivers/clk/clk-twl6040.c index 4a755135bcd3..8515232ffc75 100644 --- a/drivers/clk/clk-twl6040.c +++ b/drivers/clk/clk-twl6040.c @@ -91,7 +91,7 @@ static int twl6040_clk_probe(struct platform_device *pdev) clkdata->twl6040 = twl6040; clkdata->mcpdm_fclk.init = &wm831x_clkout_init; - clkdata->clk = clk_register(&pdev->dev, &clkdata->mcpdm_fclk); + clkdata->clk = devm_clk_register(&pdev->dev, &clkdata->mcpdm_fclk); if (IS_ERR(clkdata->clk)) return PTR_ERR(clkdata->clk); @@ -100,21 +100,11 @@ static int twl6040_clk_probe(struct platform_device *pdev) return 0; } -static int twl6040_clk_remove(struct platform_device *pdev) -{ - struct twl6040_clk *clkdata = platform_get_drvdata(pdev); - - clk_unregister(clkdata->clk); - - return 0; -} - static struct platform_driver twl6040_clk_driver = { .driver = { .name = "twl6040-clk", }, .probe = twl6040_clk_probe, - .remove = twl6040_clk_remove, }; module_platform_driver(twl6040_clk_driver); |