Commit 5c757456 authored by Axel Lin's avatar Axel Lin Committed by Stephen Boyd

clk: twl6040: Convert to use devm_clk_register

Use devm_clk_register() to simplify the code by removing
twl6040_clk_remove().
Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
Acked-by: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
parent 264e3b75
...@@ -91,7 +91,7 @@ static int twl6040_clk_probe(struct platform_device *pdev) ...@@ -91,7 +91,7 @@ static int twl6040_clk_probe(struct platform_device *pdev)
clkdata->twl6040 = twl6040; clkdata->twl6040 = twl6040;
clkdata->mcpdm_fclk.init = &wm831x_clkout_init; 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)) if (IS_ERR(clkdata->clk))
return PTR_ERR(clkdata->clk); return PTR_ERR(clkdata->clk);
...@@ -100,21 +100,11 @@ static int twl6040_clk_probe(struct platform_device *pdev) ...@@ -100,21 +100,11 @@ static int twl6040_clk_probe(struct platform_device *pdev)
return 0; 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 = { static struct platform_driver twl6040_clk_driver = {
.driver = { .driver = {
.name = "twl6040-clk", .name = "twl6040-clk",
}, },
.probe = twl6040_clk_probe, .probe = twl6040_clk_probe,
.remove = twl6040_clk_remove,
}; };
module_platform_driver(twl6040_clk_driver); module_platform_driver(twl6040_clk_driver);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment