regulator: Replace error prints in regulator_check_drms() with debug prints

Errors returned from regulator_check_drms() are not treated as fatal
by any of its callers, nor are they passed up through exported
regulator APIs. Instead, these errors are used to indicate that a
regulator does not support multiple current modes.

For example, the exported regulator_set_optimum_mode() API explicitly
discards errors from regulator_check_drms() and returns success anyway
since there is no work to be done to change modes.

To prevent errors from being printed in these cases, downgrade the
rdev_err() prints in regulator_check_drms() to rdev_dbg() prints.

Change-Id: I465dcad59722b0f1fb9384beba01f6411a4a693a
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
This commit is contained in:
Matt Wagantall 2012-06-27 14:36:20 -07:00 committed by Rohit Vaswani
parent 01f8ba7f67
commit d68c0879b8

View file

@ -337,7 +337,7 @@ static int regulator_mode_constrain(struct regulator_dev *rdev, int *mode)
static int regulator_check_drms(struct regulator_dev *rdev)
{
if (!rdev->constraints) {
rdev_err(rdev, "no constraints\n");
rdev_dbg(rdev, "no constraints\n");
return -ENODEV;
}
if (!(rdev->constraints->valid_ops_mask & REGULATOR_CHANGE_DRMS)) {