On Fri, 17 Dec 2010 03:46:12 -0500 (EST) Len Brown <lenb@xxxxxxxxxx> wrote: > > wonder if the code could do just enough to register the device, and > > do everything else in the background? > > or do it later on demand... that makes complete sense... but you can even just do that async.. to cut down the time of first use.... if you want I can propose a patch for that based on the patch below... > > This patch reduces acpi_battery_init() time > on the Lenovo S10-3 from 901,603 usec to 657 usec. > > AFAICT, the battery monitor etc worked fine. > > diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c > index 95649d3..79e8ba3 100644 > --- a/drivers/acpi/battery.c > +++ b/drivers/acpi/battery.c > @@ -943,7 +943,6 @@ static int acpi_battery_add(struct acpi_device > *device) if (ACPI_SUCCESS(acpi_get_handle(battery->device->handle, > "_BIX", &handle))) > set_bit(ACPI_BATTERY_XINFO_PRESENT, &battery->flags); > - acpi_battery_update(battery); > #ifdef CONFIG_ACPI_PROCFS_POWER > result = acpi_battery_add_fs(device); > #endif > > > -- Arjan van de Ven Intel Open Source Technology Centre For development, discussion and tips for power savings, visit http://www.lesswatts.org -- 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