Skip to content
Commit e573520b authored by David Brownell's avatar David Brownell Committed by Liam Girdwood
Browse files

regulator: improved mode error checks



Minor bugfixes in handling of regulator modes:

 - have the routine verifying regulator modes check against
   the set of legal modes (!);

 - have regulator_set_optimum_mode() verify the return value
   of regulator_ops.get_optimum_mode(), like drms_uA_update();

 - one call to regulator_ops.set_mode() treated zero as a
   failure code; make this consistent with other callers.

Both regulator_set_mode() and regulator_set_optimum_mode() now
require valid_ops_mask to include REGULATOR_CHANGE_MODE; that
seems like a bugfix too.

Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
parent 412aec61
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment