Commit 98b0cf2
ACPI: battery: Call power_supply_changed() when adding hooks
If a battery hook is added to a battery, userspace software
is not informed that the available properties of the battery
might have changed. This for example causes upower to react
slowly if a new battery hook is added during runtime.
Fix this by calling power_supply_changed() if a battery hook
was successfully added/removed.
Tested on a Dell Inspiron 3505.
Signed-off-by: Armin Wolf <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>1 parent b7b275e commit 98b0cf2
1 file changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
696 | 696 | | |
697 | 697 | | |
698 | 698 | | |
699 | | - | |
| 699 | + | |
| 700 | + | |
700 | 701 | | |
701 | 702 | | |
702 | 703 | | |
| |||
735 | 736 | | |
736 | 737 | | |
737 | 738 | | |
| 739 | + | |
| 740 | + | |
738 | 741 | | |
739 | 742 | | |
740 | 743 | | |
| |||
0 commit comments