All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] regulator: Fix bug in regulator_mode_to_status() core function.
@ 2012-07-11 12:10 Krystian Garbaciak
  2012-07-11 13:28 ` Mark Brown
  0 siblings, 1 reply; 11+ messages in thread
From: Krystian Garbaciak @ 2012-07-11 12:10 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood; +Cc: linux-kernel

Fix typo for case REGULATOR_STATUS_STANDBY -> REGULATOR_MODE_STANDBY.
For undefined mode, return REGULATOR_STATUS_ERROR (0 is not valid status).

Signed-off-by: Krystian Garbaciak <krystian.garbaciak@diasemi.com>
---
 drivers/regulator/core.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 09a737c..b821a9f 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -2909,10 +2909,10 @@ int regulator_mode_to_status(unsigned int mode)
 		return REGULATOR_STATUS_NORMAL;
 	case REGULATOR_MODE_IDLE:
 		return REGULATOR_STATUS_IDLE;
-	case REGULATOR_STATUS_STANDBY:
+	case REGULATOR_MODE_STANDBY:
 		return REGULATOR_STATUS_STANDBY;
 	default:
-		return 0;
+		return REGULATOR_STATUS_ERROR;
 	}
 }
 EXPORT_SYMBOL_GPL(regulator_mode_to_status);
-- 
1.7.0.4


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

end of thread, other threads:[~2012-07-12 17:20 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-11 12:10 [PATCH] regulator: Fix bug in regulator_mode_to_status() core function Krystian Garbaciak
2012-07-11 13:28 ` Mark Brown
2012-07-11 14:18   ` Krystian Garbaciak
2012-07-11 14:26     ` Mark Brown
2012-07-11 15:13     ` Krystian Garbaciak
2012-07-11 17:42       ` Mark Brown
2012-07-12 10:50         ` [PATCH] regulator: Fix a typo " Krystian Garbaciak
2012-07-12 12:53           ` [PATCH] regulator: Add REGULATOR_STATUS_UNDEFINED Krystian Garbaciak
2012-07-12 17:20             ` Mark Brown
2012-07-12 17:18           ` [PATCH] regulator: Fix a typo in regulator_mode_to_status() core function Mark Brown
2012-07-12 17:20           ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.