summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/battery.c
diff options
context:
space:
mode:
authorAlan Jenkins <alan-jenkins@tuffmail.co.uk>2009-06-30 16:36:16 +0200
committerLen Brown <len.brown@intel.com>2010-04-05 01:53:23 +0200
commitf79e1cec8c8aa64895fd7b595dc7b48157df0754 (patch)
treefe54a474018cd1561dee79049a4fa22d2a62a9c4 /drivers/acpi/battery.c
parentACPI: battery: Fix CONFIG_ACPI_SYSFS_POWER=n (diff)
downloadlinux-f79e1cec8c8aa64895fd7b595dc7b48157df0754.tar.xz
linux-f79e1cec8c8aa64895fd7b595dc7b48157df0754.zip
ACPI: battery drivers should call power_supply_changed()
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 <alan-jenkins@tuffmail.co.uk> Acked-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/battery.c')
-rw-r--r--drivers/acpi/battery.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
index 52df9947dbb2..db78b6e0ea6a 100644
--- a/drivers/acpi/battery.c
+++ b/drivers/acpi/battery.c
@@ -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
}