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

Commit 1eef1600 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull regulator fixes from Mark Brown:
 "One small fix for an edge condition in the max8997 driver and a fix
  for a surprise in the devres API which caused devm_regulator_put() to
  not actually put the regulator - a nicer version of this based on an
  improvement of the devres API is queued for 3.5."

* tag 'regulator-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  regulator: Actually free the regulator in devm_regulator_put()
  regulator: Fix the logic to ensure new voltage setting in valid range
parents 789505b0 968c2c17
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1431,6 +1431,9 @@ void devm_regulator_put(struct regulator *regulator)

	rc = devres_destroy(regulator->dev, devm_regulator_release,
			    devm_regulator_match, regulator);
	if (rc == 0)
		regulator_put(regulator);
	else
		WARN_ON(rc);
}
EXPORT_SYMBOL_GPL(devm_regulator_put);
+1 −1
Original line number Diff line number Diff line
@@ -684,7 +684,7 @@ static int max8997_set_voltage_buck(struct regulator_dev *rdev,
		}

		new_val++;
	} while (desc->min + desc->step + new_val <= desc->max);
	} while (desc->min + desc->step * new_val <= desc->max);

	new_idx = tmp_idx;
	new_val = tmp_val;