All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jaehoon Chung <jh80.chung@samsung.com>
To: Mark Brown <broonie@kernel.org>
Cc: Chris Ball <cjb@laptop.org>,
	linux-mmc@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
	linaro-kernel@lists.linaro.org, Mark Brown <broonie@linaro.org>
Subject: Re: [PATCH] mmc: sdhci-s3c: Check if clk_set_rate() succeeds
Date: Fri, 30 Aug 2013 17:21:44 +0900	[thread overview]
Message-ID: <52205618.70107@samsung.com> (raw)
In-Reply-To: <1377792936-775-1-git-send-email-broonie@kernel.org>

Looks good to me.

Acked-by: Jaehoon Chung <jh80.chung@samsung.com>

On 08/30/2013 01:15 AM, Mark Brown wrote:
> From: Mark Brown <broonie@linaro.org>
> 
> It is possible that we may fail to set the clock rate, if we do so then
> log the failure and don't bother reprogramming the IP.
> 
> Signed-off-by: Mark Brown <broonie@linaro.org>
> ---
>  drivers/mmc/host/sdhci-s3c.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c
> index 926aaf6..d10de3f 100644
> --- a/drivers/mmc/host/sdhci-s3c.c
> +++ b/drivers/mmc/host/sdhci-s3c.c
> @@ -295,6 +295,7 @@ static void sdhci_cmu_set_clock(struct sdhci_host *host, unsigned int clock)
>  	struct device *dev = &ourhost->pdev->dev;
>  	unsigned long timeout;
>  	u16 clk = 0;
> +	int ret;
>  
>  	/* don't bother if the clock is going off */
>  	if (clock == 0)
> @@ -302,7 +303,12 @@ static void sdhci_cmu_set_clock(struct sdhci_host *host, unsigned int clock)
>  
>  	sdhci_s3c_set_clock(host, clock);
>  
> -	clk_set_rate(ourhost->clk_bus[ourhost->cur_clk], clock);
> +	ret = clk_set_rate(ourhost->clk_bus[ourhost->cur_clk], clock);
> +	if (ret != 0) {
> +		dev_err(dev, "%s: failed to set clock rate %uHz\n",
> +			mmc_hostname(host->mmc), clock);
> +		return;
> +	}
>  
>  	host->clock = clock;
>  
> 


  reply	other threads:[~2013-08-30  8:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-29 16:15 [PATCH] mmc: sdhci-s3c: Check if clk_set_rate() succeeds Mark Brown
2013-08-30  8:21 ` Jaehoon Chung [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-12-12 11:21 Mark Brown
2014-11-04 12:26 Mark Brown
2014-11-04 16:04 ` 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=52205618.70107@samsung.com \
    --to=jh80.chung@samsung.com \
    --cc=broonie@kernel.org \
    --cc=broonie@linaro.org \
    --cc=cjb@laptop.org \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.