Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d68c0879 authored by Matt Wagantall's avatar Matt Wagantall Committed by Rohit Vaswani
Browse files

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: default avatarMatt Wagantall <mattw@codeaurora.org>
Signed-off-by: default avatarAbhijeet Dharmapurikar <adharmap@codeaurora.org>
parent 01f8ba7f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)) {