From: Mark Brown Date: Sun, 13 Mar 2016 08:19:47 +0000 (+0700) Subject: Merge remote-tracking branches 'regulator/topic/ltc3589', 'regulator/topic/max77620... X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=d6d50a8f174141846f7507cefbf369a7100a6788;p=openwrt%2Fstaging%2Fblogic.git Merge remote-tracking branches 'regulator/topic/ltc3589', 'regulator/topic/max77620', 'regulator/topic/max77686', 'regulator/topic/max77802' and 'regulator/topic/maxim' into regulator-next --- d6d50a8f174141846f7507cefbf369a7100a6788 diff --cc drivers/regulator/core.c index 1cff11205642,744c9889f88d,5b1e049a5930,744c9889f88d,744c9889f88d,744c9889f88d..e0b764284773 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@@@@@@ -1135,23 -1136,16 -1136,38 -1136,16 -1136,16 -1136,16 +1135,34 @@@@@@@ static int set_machine_constraints(stru ret = ops->set_over_current_protection(rdev); if (ret < 0) { rdev_err(rdev, "failed to set over current protection\n"); ----- goto out; +++++ return ret; + +++ } + +++ } + +++ + +++ if (rdev->constraints->active_discharge && ops->set_active_discharge) { + +++ bool ad_state = (rdev->constraints->active_discharge == + +++ REGULATOR_ACTIVE_DISCHARGE_ENABLE) ? true : false; + +++ + +++ ret = ops->set_active_discharge(rdev, ad_state); + +++ if (ret < 0) { + +++ rdev_err(rdev, "failed to set active discharge\n"); + +++ return ret; + +++ } + +++ } + +++ ++ +++ if (rdev->constraints->active_discharge && ops->set_active_discharge) { ++ +++ bool ad_state = (rdev->constraints->active_discharge == ++ +++ REGULATOR_ACTIVE_DISCHARGE_ENABLE) ? true : false; ++ +++ ++ +++ ret = ops->set_active_discharge(rdev, ad_state); ++ +++ if (ret < 0) { ++ +++ rdev_err(rdev, "failed to set active discharge\n"); ++ +++ return ret; + } + } + print_constraints(rdev); return 0; -----out: ----- kfree(rdev->constraints); ----- rdev->constraints = NULL; ----- return ret; } /**