@@ -812,7 +812,7 @@ static void acpi_battery_notify(acpi_handle handle, u32 event, void *data)
#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
}
@@ -890,7 +890,7 @@ static void acpi_sbs_callback(void *context)
sbs->charger_present);
#endif
#ifdef CONFIG_ACPI_SYSFS_POWER
- kobject_uevent(&sbs->charger.dev->kobj, KOBJ_CHANGE);
+ power_supply_changed(&sbs->charger);
#endif
}
if (sbs->manager_present) {
@@ -909,7 +909,7 @@ static void acpi_sbs_callback(void *context)
bat->present);
#endif
#ifdef CONFIG_ACPI_SYSFS_POWER
- kobject_uevent(&bat->bat.dev->kobj, KOBJ_CHANGE);
+ power_supply_changed(&bat->bat);
#endif
}
}
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> -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html