public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: broonie@opensource.wolfsonmicro.com
Cc: Grant Likely <grant.likely@secretlab.ca>,
	lrg@ti.com, Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org
Subject: Board breakage due to upstream patch
Date: Thu, 29 Mar 2012 10:52:07 +0100	[thread overview]
Message-ID: <4F7430C7.6060505@linaro.org> (raw)

Hi Mark,

Your patch "regulator: Support driver probe deferral" (below) prevents my Snowball Development Board from booting.

What's the correct thing to do?

---------------------------------------------------------------------

Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
Date:   Sun Mar 11 13:07:56 2012 +0000

    regulator: Support driver probe deferral
    
    If we fail to locate a requested regulator return -EPROBE_DEFER. If drivers
    pass this error code through to their caller (which they really should)
    then this will ensure that the probe is retried later when further devices
    become available.  In the unusual case where a driver doesn't want this
    it can override the default behaviour.
    
    Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
    Acked-by: Grant Likely <grant.likely@secretlab.ca>
    Acked-by: Liam Girdwood <lrg@ti.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index e9a83f8..fcde037 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -1210,7 +1210,7 @@ static struct regulator *_regulator_get(struct device *dev, const char *id,
 {
        struct regulator_dev *rdev;
        struct regulator_map *map;
-       struct regulator *regulator = ERR_PTR(-ENODEV);
+       struct regulator *regulator = ERR_PTR(-EPROBE_DEFER);
        const char *devname = NULL;
        int ret;
 
@@ -2834,7 +2834,7 @@ struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc,
 
                if (!r) {
                        dev_err(dev, "Failed to find supply %s\n", supply);
-                       ret = -ENODEV;
+                       ret = -EPROBE_DEFER;
                        goto scrub;
                }

Kind regards,
Lee

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
M: +44 77 88 633 515 
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

             reply	other threads:[~2012-03-29  9:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-29  9:52 Lee Jones [this message]
2012-03-29 11:04 ` Board breakage due to upstream patch Mark Brown
2012-03-29 11:53   ` Lee Jones
2012-03-29 12:05     ` Mark Brown

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=4F7430C7.6060505@linaro.org \
    --to=lee.jones@linaro.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=grant.likely@secretlab.ca \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lrg@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