ANDROID: usb: typec: tcpm: Fix event storm caused by error in backport
As noted by Badhri, the patch
https://lore.kernel.org/linux-usb/20210317181249.1062995-1-badhri@google.com/
Adds the power_supply_changed() to tcpm_psy_set_prop(), but the
patch submitted to Gerrit added it in tcpm_psy_get_prop()
This causes a uevent storm which results in lots of strange
behavior and error messages.
Thus, as suggested by Badhri, this patch removes the
power_supply_changed() call in the tcpm_psy_get_prop(), and adds
it to the tcpm_psy_get_prop() function to match the original
patch.
Debugged-and-Suggested-by: Badhri Jagan Sridharan <badhri@google.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Fixes: 6f85b7e0f8
("UPSTREAM: usb: typec: tcpm: Invoke power_supply_changed for tcpm-source-psy-")
Change-Id: Ib161d15b82ef0fad541cda79f8832145218fb137
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
0b6fadd02e
commit
958c19b19b
@@ -6009,7 +6009,6 @@ static int tcpm_psy_get_prop(struct power_supply *psy,
|
|||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
power_supply_changed(port->psy);
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -6061,6 +6060,7 @@ static int tcpm_psy_set_prop(struct power_supply *psy,
|
|||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
power_supply_changed(port->psy);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user