Merge tag 'regulator-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
Pull regulator fix from Mark Brown: "A smallish fix for a lock dependency issue which affects a bunch of Qualcomm boards that do unusually complicated things with their regulators, the API is unlikely to be called by any other system." * tag 'regulator-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: Fix recursive mutex lockdep warning
This commit is contained in:
@@ -2519,9 +2519,12 @@ int regulator_set_optimum_mode(struct regulator *regulator, int uA_load)
|
|||||||
{
|
{
|
||||||
struct regulator_dev *rdev = regulator->rdev;
|
struct regulator_dev *rdev = regulator->rdev;
|
||||||
struct regulator *consumer;
|
struct regulator *consumer;
|
||||||
int ret, output_uV, input_uV, total_uA_load = 0;
|
int ret, output_uV, input_uV = 0, total_uA_load = 0;
|
||||||
unsigned int mode;
|
unsigned int mode;
|
||||||
|
|
||||||
|
if (rdev->supply)
|
||||||
|
input_uV = regulator_get_voltage(rdev->supply);
|
||||||
|
|
||||||
mutex_lock(&rdev->mutex);
|
mutex_lock(&rdev->mutex);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -2554,10 +2557,7 @@ int regulator_set_optimum_mode(struct regulator *regulator, int uA_load)
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* get input voltage */
|
/* No supply? Use constraint voltage */
|
||||||
input_uV = 0;
|
|
||||||
if (rdev->supply)
|
|
||||||
input_uV = regulator_get_voltage(rdev->supply);
|
|
||||||
if (input_uV <= 0)
|
if (input_uV <= 0)
|
||||||
input_uV = rdev->constraints->input_uV;
|
input_uV = rdev->constraints->input_uV;
|
||||||
if (input_uV <= 0) {
|
if (input_uV <= 0) {
|
||||||
|
Reference in New Issue
Block a user