From: shawn.guo@linaro.org (Shawn Guo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: amba: adapt to regulator probe deferral change
Date: Fri, 30 Mar 2012 21:55:37 +0800 [thread overview]
Message-ID: <1333115737-1654-1-git-send-email-shawn.guo@linaro.org> (raw)
The commit 04bf301 (regulator: Support driver probe deferral) changes
regulator_get() and regulator_register() to return -EPROBE_DEFER
instead of -ENODEV. Adapt amba bus driver to the change, otherwise
amba_probe() will fail on the platforms that do not have "vcore"
regulator device.
It fixes the boot failure on i.mx28 which uses amba-pl011 as serial
console.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
drivers/amba/bus.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c
index 01c2cf4..aafee73 100644
--- a/drivers/amba/bus.c
+++ b/drivers/amba/bus.c
@@ -362,8 +362,8 @@ static int amba_get_enable_vcore(struct amba_device *pcdev)
pcdev->vcore = vcore;
if (IS_ERR(vcore)) {
- /* It is OK not to supply a vcore regulator */
- if (PTR_ERR(vcore) == -ENODEV)
+ /* It should not fail in case of -EPROBE_DEFER */
+ if (PTR_ERR(vcore) == -EPROBE_DEFER)
return 0;
return PTR_ERR(vcore);
}
--
1.7.5.4
next reply other threads:[~2012-03-30 13:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-30 13:55 Shawn Guo [this message]
2012-03-30 14:23 ` [PATCH] ARM: amba: adapt to regulator probe deferral change Fabio Estevam
2012-03-31 1:33 ` Shawn Guo
2012-03-30 18:01 ` Russell King - ARM Linux
2012-03-31 5:25 ` Shawn Guo
2012-03-31 13:42 ` Mark Brown
2012-03-31 14:35 ` Russell King - ARM Linux
2012-03-31 16:53 ` Mark Brown
2012-04-01 12:19 ` Linus Walleij
2012-04-01 15:29 ` 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=1333115737-1654-1-git-send-email-shawn.guo@linaro.org \
--to=shawn.guo@linaro.org \
--cc=linux-arm-kernel@lists.infradead.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).