From: s.hauer@pengutronix.de (Sascha Hauer)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] rtc: rtc-mxc: Adapt to the new i.mx clock framework
Date: Mon, 9 Jul 2012 08:50:59 +0200 [thread overview]
Message-ID: <20120709065059.GK30009@pengutronix.de> (raw)
In-Reply-To: <1341694041-7839-2-git-send-email-festevam@gmail.com>
On Sat, Jul 07, 2012 at 05:47:20PM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
> drivers/rtc/rtc-mxc.c | 8 ++++----
> 1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/rtc/rtc-mxc.c b/drivers/rtc/rtc-mxc.c
> index e3e50d6..5d8456a 100644
> --- a/drivers/rtc/rtc-mxc.c
> +++ b/drivers/rtc/rtc-mxc.c
> @@ -367,14 +367,14 @@ static int __init mxc_rtc_probe(struct platform_device *pdev)
> pdata->ioaddr = devm_ioremap(&pdev->dev, res->start,
> resource_size(res));
>
> - pdata->clk = clk_get(&pdev->dev, "rtc");
> + pdata->clk = clk_get(&pdev->dev, NULL);
Since the rest of the driver already uses devm_, why not do it here
aswell?
Sascha
> if (IS_ERR(pdata->clk)) {
> dev_err(&pdev->dev, "unable to get clock!\n");
> ret = PTR_ERR(pdata->clk);
> goto exit_free_pdata;
> }
>
> - clk_enable(pdata->clk);
> + clk_prepare_enable(pdata->clk);
> rate = clk_get_rate(pdata->clk);
>
> if (rate == 32768)
> @@ -426,7 +426,7 @@ static int __init mxc_rtc_probe(struct platform_device *pdev)
> exit_clr_drvdata:
> platform_set_drvdata(pdev, NULL);
> exit_put_clk:
> - clk_disable(pdata->clk);
> + clk_disable_unprepare(pdata->clk);
> clk_put(pdata->clk);
>
> exit_free_pdata:
> @@ -440,7 +440,7 @@ static int __exit mxc_rtc_remove(struct platform_device *pdev)
>
> rtc_device_unregister(pdata->rtc);
>
> - clk_disable(pdata->clk);
> + clk_disable_unprepare(pdata->clk);
> clk_put(pdata->clk);
> platform_set_drvdata(pdev, NULL);
>
> --
> 1.7.1
>
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2012-07-09 6:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-07 20:47 [PATCH 1/3] ARM: clk-imx27: Fix rtc clock id Fabio Estevam
2012-07-07 20:47 ` [PATCH 2/3] rtc: rtc-mxc: Adapt to the new i.mx clock framework Fabio Estevam
2012-07-09 6:50 ` Sascha Hauer [this message]
2012-07-07 20:47 ` [PATCH 3/3] rtc: rtc-mxc: Convert to module_platform_driver Fabio Estevam
2012-07-09 6:51 ` [PATCH 1/3] ARM: clk-imx27: Fix rtc clock id Sascha Hauer
2012-07-09 21:18 ` Andrew Morton
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=20120709065059.GK30009@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).