Skip to contentSkip to conversation

ACPI: parallel resume for ACPI battery

RFC PATCH In review Zhang Rui 1 participant 1 message Dec 19, 2008 ACPI

lore
Share & tools
lore

Zhang Rui

author
#0 lore raw

RFC PATCH 3/3 ACPI: parallel resume for ACPI battery

Allow battery resume in parallel.

Signed-off-by Zhang Rui <rui.zhang>
---
 drivers/acpi/battery.c |    3 +++
 1 file changed, 3 insertions(+)
drivers/acpi/battery.c +3 -0
Index: linux-2.6/drivers/acpi/battery.c
===================================================================
@@ -819,6 +819,7 @@ static int acpi_battery_add(struct acpi_
 		result = -ENODEV;
 		goto end;
 	}
+	device_parallel_resume_register(&device->dev, 0);
 	printk(KERN_INFO PREFIX "%s Slot [%s] (battery %s)\n",
 	       ACPI_BATTERY_DEVICE_NAME, acpi_device_bid(device),
 	       device->status.battery_present ? "present" : "absent");
@@ -839,6 +840,8 @@ static int acpi_battery_remove(struct ac
 
 	if (!device || !acpi_driver_data(device))
 		return -EINVAL;
+
+	device_parallel_resume_unregister(&device->dev);
 	battery = acpi_driver_data(device);
 	status = acpi_remove_notify_handler(device->handle,
 					    ACPI_ALL_NOTIFY,