public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Chris Ball <cjb@laptop.org>
To: NeilBrown <neilb@suse.de>
Cc: Venkatraman S <svenkatr@ti.com>, Balaji T K <balajitk@ti.com>,
	Rajendra Nayak <rnayak@ti.com>,
	linux-omap@vger.kernel.org, linux-mmc@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] MMC/omap_hsmmc: handle failure of regulator_get better.
Date: Wed, 08 Aug 2012 00:07:15 -0400	[thread overview]
Message-ID: <874noeuivg.fsf@octavius.laptop.org> (raw)
In-Reply-To: <20120730101245.7dbe72b0@notabene.brown> (NeilBrown's message of "Mon, 30 Jul 2012 10:12:45 +1000")

Hi,

On Sun, Jul 29 2012, NeilBrown wrote:
> 1/ if regulator_get fails, return an error.  This is important
>    if it failed with EPROBE_DEFER, as the probe needs to be
>    deferred.
>
> 2/ Don't set .set_power until the regulator has been found, or
>    the deferred probe will not bother calling omap_hsmmc_reg_get().
>
> Signed-off-by: NeilBrown <neilb@suse.de>
>
> diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
> index 389a3ee..f052c29 100644
> --- a/drivers/mmc/host/omap_hsmmc.c
> +++ b/drivers/mmc/host/omap_hsmmc.c
> @@ -299,12 +299,12 @@ static int omap_hsmmc_reg_get(struct omap_hsmmc_host *host)
>  	struct regulator *reg;
>  	int ocr_value = 0;
>  
> -	mmc_slot(host).set_power = omap_hsmmc_set_power;
> -
>  	reg = regulator_get(host->dev, "vmmc");
>  	if (IS_ERR(reg)) {
>  		dev_dbg(host->dev, "vmmc regulator missing\n");
> +		return PTR_ERR(reg);
>  	} else {
> +		mmc_slot(host).set_power = omap_hsmmc_set_power;
>  		host->vcc = reg;
>  		ocr_value = mmc_regulator_get_ocrmask(reg);
>  		if (!mmc_slot(host).ocr_mask) {

Thanks, pushed to mmc-next for 3.7.

- Chris.
-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

      parent reply	other threads:[~2012-08-08  4:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-30  0:12 [PATCH] MMC/omap_hsmmc: handle failure of regulator_get better NeilBrown
2012-07-30  5:20 ` Rajendra Nayak
2012-07-30  6:24   ` NeilBrown
2012-07-30  6:37     ` Rajendra Nayak
2012-07-30  6:48       ` NeilBrown
2012-08-08  4:07 ` Chris Ball [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=874noeuivg.fsf@octavius.laptop.org \
    --to=cjb@laptop.org \
    --cc=balajitk@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=rnayak@ti.com \
    --cc=svenkatr@ti.com \
    /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