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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Allow battery resume in parallel.

Signed-off-by: Zhang Rui <rui.zhang>
---
 drivers/acpi/battery.c |    3 +++
 1 file changed, 3 insertions(+)

Index: linux-2.6/drivers/acpi/battery.c
===================================================================
--- linux-2.6.orig/drivers/acpi/battery.c
+++ 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,


--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux