On Thu, Dec 23, 2010 at 11:23:42PM +0100, Rafael J. Wysocki wrote: > As I've already said on IRC, I'd simply add a new function like: > > void acpi_battery_refresh(struct acpi_battery *battery) > { > if (!battery->bat.dev) > return; > acpi_battery_get_info(battery); > /* The battery may have changed its reporting units */ > sysfs_remove_battery(battery); > sysfs_add_battery(battery); > } > > and call it before acpi_battery_update() > (a) in acpi_battery_resume() > (b) in acpi_battery_notify() if event == ACPI_BATTERY_NOTIFY_INFO > > That would be more straightforward IMHO. That might be more reasonable. Want to send that, or shall I? -- Matthew Garrett | mjg59@xxxxxxxxxxxxx -- 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