From: Jaehoon Chung <jh80.chung@samsung.com>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Jingoo Han <jg1.han@samsung.com>, Chris Ball <cjb@laptop.org>,
linux-mmc@vger.kernel.org, Ben Dooks <ben-linux@fluff.org>
Subject: Re: [PATCH v2 RESEND] mmc: sdhci-s3c: Use devm_clk_get()
Date: Fri, 15 Feb 2013 20:59:49 +0900 [thread overview]
Message-ID: <511E2335.3070804@samsung.com> (raw)
In-Reply-To: <CAPDyKFqN8=Bs96uhV_+da_==_5Rw2tEvE62fAiVCAf3cm46g9g@mail.gmail.com>
It looks good to me.
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
On 02/14/2013 08:58 PM, Ulf Hansson wrote:
> On 12 February 2013 04:24, Jingoo Han <jg1.han@samsung.com> wrote:
>> Use devm_clk_get() rather than clk_get() to make cleanup paths
>> more simple.
>>
>> Signed-off-by: Jingoo Han <jg1.han@samsung.com>
>> ---
>> Changes since v1:
>> - modified the commit message
>>
>> drivers/mmc/host/sdhci-s3c.c | 17 ++---------------
>> 1 files changed, 2 insertions(+), 15 deletions(-)
>>
>> diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c
>> index 82a8de1..5aaef5b 100644
>> --- a/drivers/mmc/host/sdhci-s3c.c
>> +++ b/drivers/mmc/host/sdhci-s3c.c
>> @@ -608,7 +608,7 @@ static int sdhci_s3c_probe(struct platform_device *pdev)
>>
>> platform_set_drvdata(pdev, host);
>>
>> - sc->clk_io = clk_get(dev, "hsmmc");
>> + sc->clk_io = devm_clk_get(dev, "hsmmc");
>> if (IS_ERR(sc->clk_io)) {
>> dev_err(dev, "failed to get io clock\n");
>> ret = PTR_ERR(sc->clk_io);
>> @@ -623,7 +623,7 @@ static int sdhci_s3c_probe(struct platform_device *pdev)
>> char name[14];
>>
>> snprintf(name, 14, "mmc_busclk.%d", ptr);
>> - clk = clk_get(dev, name);
>> + clk = devm_clk_get(dev, name);
>> if (IS_ERR(clk))
>> continue;
>>
>> @@ -765,15 +765,9 @@ static int sdhci_s3c_probe(struct platform_device *pdev)
>> #ifndef CONFIG_PM_RUNTIME
>> clk_disable_unprepare(sc->clk_bus[sc->cur_clk]);
>> #endif
>> - for (ptr = 0; ptr < MAX_BUS_CLK; ptr++) {
>> - if (sc->clk_bus[ptr]) {
>> - clk_put(sc->clk_bus[ptr]);
>> - }
>> - }
>>
>> err_no_busclks:
>> clk_disable_unprepare(sc->clk_io);
>> - clk_put(sc->clk_io);
>>
>> err_pdata_io_clk:
>> sdhci_free_host(host);
>> @@ -786,7 +780,6 @@ static int sdhci_s3c_remove(struct platform_device *pdev)
>> struct sdhci_host *host = platform_get_drvdata(pdev);
>> struct sdhci_s3c *sc = sdhci_priv(host);
>> struct s3c_sdhci_platdata *pdata = sc->pdata;
>> - int ptr;
>>
>> if (pdata->cd_type == S3C_SDHCI_CD_EXTERNAL && pdata->ext_cd_cleanup)
>> pdata->ext_cd_cleanup(&sdhci_s3c_notify_change);
>> @@ -806,13 +799,7 @@ static int sdhci_s3c_remove(struct platform_device *pdev)
>> #ifndef CONFIG_PM_RUNTIME
>> clk_disable_unprepare(sc->clk_bus[sc->cur_clk]);
>> #endif
>> - for (ptr = 0; ptr < MAX_BUS_CLK; ptr++) {
>> - if (sc->clk_bus[ptr]) {
>> - clk_put(sc->clk_bus[ptr]);
>> - }
>> - }
>> clk_disable_unprepare(sc->clk_io);
>> - clk_put(sc->clk_io);
>>
>> sdhci_free_host(host);
>> platform_set_drvdata(pdev, NULL);
>> --
>> 1.7.2.5
>>
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
> Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
next prev parent reply other threads:[~2013-02-15 11:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-12 3:24 [PATCH v2 RESEND] mmc: sdhci-s3c: Use devm_clk_get() Jingoo Han
2013-02-14 11:58 ` Ulf Hansson
2013-02-15 11:59 ` Jaehoon Chung [this message]
2013-03-22 15:53 ` Chris Ball
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=511E2335.3070804@samsung.com \
--to=jh80.chung@samsung.com \
--cc=ben-linux@fluff.org \
--cc=cjb@laptop.org \
--cc=jg1.han@samsung.com \
--cc=linux-mmc@vger.kernel.org \
--cc=ulf.hansson@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;
as well as URLs for NNTP newsgroup(s).