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@xxxxxxxxxxxxxx> diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c index 2ccc87e..9208e97 100644 --- a/drivers/acpi/battery.c +++ b/drivers/acpi/battery.c @@ -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 } diff --git a/drivers/acpi/sbs.c b/drivers/acpi/sbs.c index 4b214b7..dfa9455 100644 --- a/drivers/acpi/sbs.c +++ b/drivers/acpi/sbs.c @@ -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 } } -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html