diff mbox

[RESEND,2/3] ACPI: battery drivers should call power_supply_changed()

Message ID 4A4A22E0.6050400@tuffmail.co.uk (mailing list archive)
State Accepted
Delegated to: Alexey Starikovskiy
Headers show

Commit Message

Alan Jenkins June 30, 2009, 2:36 p.m. UTC
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>
CC: Alexey Starikovskiy <astarikovskiy@suse.de>
---
 drivers/acpi/battery.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff mbox

Patch

diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
index 908edce..7d31a23 100644
--- a/drivers/acpi/battery.c
+++ b/drivers/acpi/battery.c
@@ -811,7 +811,7 @@  static void acpi_battery_notify(struct acpi_device *device, u32 event)
 #ifdef CONFIG_ACPI_SYSFS_POWER
 	/* acpi_batter_update could remove power_supply object */
 	if (battery->bat.dev)
-		kobject_uevent(&battery->bat.dev->kobj, KOBJ_CHANGE);
+		power_supply_changed(&battery->bat);
 #endif
 }