From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: Axel Lin <axel.lin@ingics.com>, Mike Turquette <mturquette@linaro.org>
Cc: <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] clk: twl6040: Convert to use devm_clk_register
Date: Mon, 19 May 2014 19:32:52 +0300 [thread overview]
Message-ID: <537A3234.9040707@ti.com> (raw)
In-Reply-To: <1400427731.15403.1.camel@phoenix>
On 05/18/2014 06:42 PM, Axel Lin wrote:
> Use devm_clk_register() to simplify the code by removing twl6040_clk_remove().
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
>
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> ---
> drivers/clk/clk-twl6040.c | 12 +-----------
> 1 file changed, 1 insertion(+), 11 deletions(-)
>
> diff --git a/drivers/clk/clk-twl6040.c b/drivers/clk/clk-twl6040.c
> index 1ada79a..9e996b4 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,22 +100,12 @@ 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",
> .owner = THIS_MODULE,
> },
> .probe = twl6040_clk_probe,
> - .remove = twl6040_clk_remove,
> };
>
> module_platform_driver(twl6040_clk_driver);
>
--
Péter
prev parent reply other threads:[~2014-05-19 16:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-18 15:42 [PATCH] clk: twl6040: Convert to use devm_clk_register Axel Lin
2014-05-19 16:32 ` Peter Ujfalusi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=537A3234.9040707@ti.com \
--to=peter.ujfalusi@ti.com \
--cc=axel.lin@ingics.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox