]> Git Repo - linux.git/commitdiff
ACPI: battery drivers should call power_supply_changed()
authorAlan Jenkins <[email protected]>
Tue, 30 Jun 2009 14:36:16 +0000 (14:36 +0000)
committerLen Brown <[email protected]>
Sun, 4 Apr 2010 23:53:23 +0000 (19:53 -0400)
Calling kobject_uevent() directly is a layering violation.  In
particular, it means we'll miss updating the generic LED trigger.

Signed-off-by: Alan Jenkins <[email protected]>
Acked-by: Alexey Starikovskiy <[email protected]>
Signed-off-by: Len Brown <[email protected]>
drivers/acpi/battery.c

index 52df9947dbb2538d2caffa79410828736088a8ed..db78b6e0ea6a14f83ff94bbb17e7b4c340987d85 100644 (file)
@@ -879,7 +879,7 @@ static void acpi_battery_notify(struct acpi_device *device, u32 event)
 #ifdef CONFIG_ACPI_SYSFS_POWER
        /* acpi_battery_update could remove power_supply object */
        if (battery->bat.dev)
-               kobject_uevent(&battery->bat.dev->kobj, KOBJ_CHANGE);
+               power_supply_changed(&battery->bat);
 #endif
 }
 
This page took 0.058537 seconds and 4 git commands to generate.