aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-06-11 21:46:26 -0400
committerAnton Vorontsov <cbouatmailru@gmail.com>2012-06-17 23:19:59 -0400
commit92311c3c70f9b7f1b7860c2fc2ada09b4d43bfea (patch)
tree5fdcf24cdc4d9419b7802f29963de6ee9388caa6
parent485802a6c524e62b5924849dd727ddbb1497cc71 (diff)
pda_power: Complain if regulator operations fail
Rather than silently ignoring errors from the regulator enable and disable add a WARN_ON() - it's probably pretty important if we're not getting power, though it should be vanishingly unlikely in production. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
-rw-r--r--drivers/power/pda_power.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/power/pda_power.c b/drivers/power/pda_power.c
index 214468f4444a..ed54a3551148 100644
--- a/drivers/power/pda_power.c
+++ b/drivers/power/pda_power.c
@@ -134,13 +134,13 @@ static void update_charger(void)
134 regulator_set_current_limit(ac_draw, max_uA, max_uA); 134 regulator_set_current_limit(ac_draw, max_uA, max_uA);
135 if (!regulator_enabled) { 135 if (!regulator_enabled) {
136 dev_dbg(dev, "charger on (AC)\n"); 136 dev_dbg(dev, "charger on (AC)\n");
137 regulator_enable(ac_draw); 137 WARN_ON(regulator_enable(ac_draw));
138 regulator_enabled = 1; 138 regulator_enabled = 1;
139 } 139 }
140 } else { 140 } else {
141 if (regulator_enabled) { 141 if (regulator_enabled) {
142 dev_dbg(dev, "charger off\n"); 142 dev_dbg(dev, "charger off\n");
143 regulator_disable(ac_draw); 143 WARN_ON(regulator_disable(ac_draw));
144 regulator_enabled = 0; 144 regulator_enabled = 0;
145 } 145 }
146 } 146 }