linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Balaji T K <balajitk@ti.com>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: linux-mmc <linux-mmc@vger.kernel.org>,
	Chris Ball <chris@printf.net>,
	linux-omap <linux-omap@vger.kernel.org>
Subject: Re: [PATCH v2 1/6] mmc: omap_hsmmc: use devm_clk_get
Date: Thu, 15 May 2014 18:55:45 +0530	[thread overview]
Message-ID: <5374C059.8080404@ti.com> (raw)
In-Reply-To: <CAPDyKFqJc92kZn_Yj87q3GJWOq+jftm0UPsShAPREqkMKC5S4g@mail.gmail.com>

On Monday 12 May 2014 07:20 PM, Ulf Hansson wrote:
> On 12 May 2014 15:33, Balaji T K <balajitk@ti.com> wrote:
>> On Monday 12 May 2014 02:03 PM, Ulf Hansson wrote:
>>>
>>> On 9 May 2014 18:46, Balaji T K <balajitk@ti.com> wrote:
>>>>
>>>> With devm_clk_get conversion clk_put can be removed in clean up path
>>>>
>>>> Signed-off-by: Balaji T K <balajitk@ti.com>
>>>> ---
>>>>    drivers/mmc/host/omap_hsmmc.c |   15 ++++-----------
>>>>    1 files changed, 4 insertions(+), 11 deletions(-)
>>>>
>>>> diff --git a/drivers/mmc/host/omap_hsmmc.c
>>>> b/drivers/mmc/host/omap_hsmmc.c
>>>> index b4de63b..b8ae7ee 100644
>>>> --- a/drivers/mmc/host/omap_hsmmc.c
>>>> +++ b/drivers/mmc/host/omap_hsmmc.c
>>>> @@ -1922,7 +1922,7 @@ static int omap_hsmmc_probe(struct platform_device
>>>> *pdev)
>>>>
>>>>           spin_lock_init(&host->irq_lock);
>>>>
>>>> -       host->fclk = clk_get(&pdev->dev, "fck");
>>>> +       host->fclk = devm_clk_get(&pdev->dev, "fck");
>>>>           if (IS_ERR(host->fclk)) {
>>>>                   ret = PTR_ERR(host->fclk);
>>>>                   host->fclk = NULL;
>>>> @@ -1941,7 +1941,7 @@ static int omap_hsmmc_probe(struct platform_device
>>>> *pdev)
>>>>
>>>>           omap_hsmmc_context_save(host);
>>>>
>>>> -       host->dbclk = clk_get(&pdev->dev, "mmchsdb_fck");
>>>> +       host->dbclk = devm_clk_get(&pdev->dev, "mmchsdb_fck");
>>>>           /*
>>>>            * MMC can still work without debounce clock.
>>>>            */
>>>> @@ -1949,7 +1949,6 @@ static int omap_hsmmc_probe(struct platform_device
>>>> *pdev)
>>>>                   host->dbclk = NULL;
>>>>           } else if (clk_prepare_enable(host->dbclk) != 0) {
>>>>                   dev_warn(mmc_dev(host->mmc), "Failed to enable debounce
>>>> clk\n");
>>>> -               clk_put(host->dbclk);
>>>>                   host->dbclk = NULL;
>>>
>>>
>>> You should use the IS_ERR macro, no need to reset dbclk to NULL.
>>>
>>
>> Agreed, IS_ERR macro usage deserves patch on its own.
>> will create separate patch on top of this series.
>
> Or you just update this patch, since it would touch there very same
> piece of code. :-)

plus few more code additionally, since these are two different logical changes,
have sent a separate patch. But feel free to squash them if needed.

Thanks and Regards,
Balaji T K

  parent reply	other threads:[~2014-05-15 13:25 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-09 16:46 [PATCH v2 0/6] mmc: omap_hsmmc: convert to use devm_* and fixes Balaji T K
2014-05-09 16:46 ` [PATCH v2 1/6] mmc: omap_hsmmc: use devm_clk_get Balaji T K
2014-05-12  8:33   ` Ulf Hansson
2014-05-12 13:33     ` Balaji T K
2014-05-12 13:50       ` Ulf Hansson
2014-05-15 13:23         ` [PATCH] mmc: omap_hsmmc: use IS_ERR macro for error checking Balaji T K
2014-05-21 10:10           ` Ulf Hansson
2014-05-15 13:25         ` Balaji T K [this message]
2014-05-09 16:46 ` [PATCH v2 2/6] mmc: omap_hsmmc: use devm_request_irq Balaji T K
2014-05-09 16:46 ` [PATCH v2 3/6] mmc: omap_hsmmc: use devm_request_threaded_irq Balaji T K
2014-05-09 16:46 ` [PATCH v2 4/6] mmc: omap_hsmmc: use devm_ioremap_resource Balaji T K
2014-05-09 16:46 ` [PATCH v2 5/6] mmc: omap_hsmmc: fix cmd23 multiblock read/write Balaji T K
2014-05-09 16:46 ` [PATCH v2 6/6] mmc: omap_hsmmc: split omap-dma header file Balaji T K
2014-05-15 13:38   ` Balaji T K
2014-05-16 21:41   ` Tony Lindgren
2014-05-19 11:53     ` Balaji T K
2014-05-19 16:54       ` Tony Lindgren
2014-05-20 13:28         ` Balaji T K
2014-05-20 14:50           ` Tony Lindgren
2014-05-21 10:09 ` [PATCH v2 0/6] mmc: omap_hsmmc: convert to use devm_* and fixes Ulf Hansson

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=5374C059.8080404@ti.com \
    --to=balajitk@ti.com \
    --cc=chris@printf.net \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-omap@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).