public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch 2.6.30-rc3] regulator: regression fix
@ 2009-04-28  2:59 David Brownell
  2009-04-28  8:38 ` Mark Brown
  0 siblings, 1 reply; 4+ messages in thread
From: David Brownell @ 2009-04-28  2:59 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood, lkml

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>

Revert the "Don't warn on omitted voltage constraints" patch
(3e2b9abda554e9f6105996dca77cca9ef98de17a), which doesn't do
quite what its comments said it was doing.

By removing the "else", it breaks the handling of fixed-voltage
regulators ... turning a non-error/non-warning situation into
a complete init failure, which can then prevent system startup.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
---
You might want to provide a different patch, but ignoring
this regression doesn't seem practical...

 drivers/regulator/core.c |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -709,12 +709,8 @@ static int set_machine_constraints(struc
 			cmax = INT_MAX;
 		}
 
-		/* voltage constraints are optional */
-		if ((cmin == 0) && (cmax == 0))
-			goto out;
-
 		/* else require explicit machine-level constraints */
-		if (cmin <= 0 || cmax <= 0 || cmax < cmin) {
+		else if (cmin <= 0 || cmax <= 0 || cmax < cmin) {
 			pr_err("%s: %s '%s' voltage constraints\n",
 				       __func__, "invalid", name);
 			ret = -EINVAL;

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-04-28 10:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-28  2:59 [patch 2.6.30-rc3] regulator: regression fix David Brownell
2009-04-28  8:38 ` Mark Brown
2009-04-28  9:43   ` David Brownell
2009-04-28 10:49     ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox