power: pmic-voter: use force_val in rerun election
If force_val is used it can be overwritten by rerun election. Fix this by getting the effective result which takes the force_val into consideration. Change-Id: I2d52d0b2cad1d515efaa103187e7197fe78cc106 Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
This commit is contained in:
parent
02c043ee88
commit
95f429cba2
1 changed files with 4 additions and 2 deletions
|
@ -438,12 +438,14 @@ out:
|
|||
int rerun_election(struct votable *votable)
|
||||
{
|
||||
int rc = 0;
|
||||
int effective_result;
|
||||
|
||||
lock_votable(votable);
|
||||
effective_result = get_effective_result_locked(votable);
|
||||
if (votable->callback)
|
||||
rc = votable->callback(votable,
|
||||
votable->data,
|
||||
votable->effective_result,
|
||||
votable->data,
|
||||
effective_result,
|
||||
get_client_str(votable, votable->effective_client_id));
|
||||
unlock_votable(votable);
|
||||
return rc;
|
||||
|
|
Loading…
Add table
Reference in a new issue