提交 92311c3c 编写于 作者: M Mark Brown 提交者: Anton Vorontsov

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: NMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
上级 485802a6
......@@ -134,13 +134,13 @@ static void update_charger(void)
regulator_set_current_limit(ac_draw, max_uA, max_uA);
if (!regulator_enabled) {
dev_dbg(dev, "charger on (AC)\n");
regulator_enable(ac_draw);
WARN_ON(regulator_enable(ac_draw));
regulator_enabled = 1;
}
} else {
if (regulator_enabled) {
dev_dbg(dev, "charger off\n");
regulator_disable(ac_draw);
WARN_ON(regulator_disable(ac_draw));
regulator_enabled = 0;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册