mirror of https://lore.kernel.org/lkml/
 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; 8+ 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	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-08-29 13:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <201208241500@sw-eng-lt-dc-vm2>
     [not found] ` <201208241505@sw-eng-lt-dc-vm2>
2012-08-24 18:45   ` [RFC PATCH 4/8] hwmon: Add DA906x hardware monitoring support Guenter Roeck
2012-08-29 13:25     ` [PATCH] regulator: Fix bug in regulator_mode_to_status() core function Krystian Garbaciak
2012-07-11 12:10 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

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

Powered by JetHome