From: "Ying-Chun Liu (PaulLiu)" <paulliu@debian.org>
To: linux-kernel@vger.kernel.org
Cc: patches@linaro.org, Liam Girdwood <lrg@ti.com>,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
"Ying-Chun Liu (PaulLiu)" <paulliu@debian.org>
Subject: [PATCH] regulator: da9052: fix bug in device tree iteration loop
Date: Mon, 7 May 2012 15:57:23 +0800 [thread overview]
Message-ID: <1336377443-5926-1-git-send-email-paulliu@debian.org> (raw)
From: "Ying-Chun Liu (PaulLiu)" <paulliu@debian.org>
The driver of da9052 is buggy due to the iteration loop of device tree.
This patch fix the loop condition to make the driver work with device tree.
Signed-off-by: Ying-Chun Liu (PaulLiu) <paulliu@debian.org>
---
drivers/regulator/da9052-regulator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/da9052-regulator.c b/drivers/regulator/da9052-regulator.c
index eaa91cc5..f8ad24a 100644
--- a/drivers/regulator/da9052-regulator.c
+++ b/drivers/regulator/da9052-regulator.c
@@ -444,7 +444,7 @@ static int __devinit da9052_regulator_probe(struct platform_device *pdev)
if (!nproot)
return -ENODEV;
- for (np = of_get_next_child(nproot, NULL); !np;
+ for (np = of_get_next_child(nproot, NULL); np;
np = of_get_next_child(nproot, np)) {
if (!of_node_cmp(np->name,
regulator->info->reg_desc.name)) {
--
1.7.10
next reply other threads:[~2012-05-07 7:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-07 7:57 Ying-Chun Liu (PaulLiu) [this message]
2012-05-07 11:52 ` 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=1336377443-5926-1-git-send-email-paulliu@debian.org \
--to=paulliu@debian.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lrg@ti.com \
--cc=patches@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
all inboxes | Powered by JetHome®