]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
cpcap-charger: generate events for userspace
authorPavel Machek <pavel@ucw.cz>
Thu, 27 Dec 2018 19:52:21 +0000 (20:52 +0100)
committerSebastian Reichel <sre@kernel.org>
Sun, 20 Jan 2019 21:40:27 +0000 (22:40 +0100)
The driver doesn't generate uevents on charger connect/disconnect.
This leads to UPower not detecting when AC is on or off... and that is
bad.

Reported by Arthur D. on github (
https://github.com/maemo-leste/bugtracker/issues/206 ), thanks to
Merlijn Wajer for suggesting a fix.

Cc: stable@kernel.org
Signed-off-by: Pavel Machek <pavel@ucw.cz>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/cpcap-charger.c

index c843eaff8ad055ae3a3de0067ca1edbf9d09716e..c3ed7b476676dd069ce22efa0df02c3200aaa5b3 100644 (file)
@@ -458,6 +458,7 @@ static void cpcap_usb_detect(struct work_struct *work)
                        goto out_err;
        }
 
+       power_supply_changed(ddata->usb);
        return;
 
 out_err: