From 7292576043666ff39946dee14641fe719ba8c7e8 Mon Sep 17 00:00:00 2001 From: Konstantin Karasyov Date: Wed, 21 Feb 2007 02:05:58 -0500 Subject: ACPI: fix S3 fan resume issue http://bugzilla.kernel.org/show_bug.cgi?id=7570#c14 Signed-off-by: Konstantin Karasyov Signed-off-by: Len Brown --- drivers/acpi/power.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'drivers/acpi/power.c') diff --git a/drivers/acpi/power.c b/drivers/acpi/power.c index 1ef338545df..547eee7537b 100644 --- a/drivers/acpi/power.c +++ b/drivers/acpi/power.c @@ -436,8 +436,6 @@ int acpi_power_transition(struct acpi_device *device, int state) cl = &device->power.states[device->power.state].resources; tl = &device->power.states[state].resources; - device->power.state = ACPI_STATE_UNKNOWN; - if (!cl->count && !tl->count) { result = -ENODEV; goto end; @@ -468,12 +466,15 @@ int acpi_power_transition(struct acpi_device *device, int state) goto end; } - /* We shouldn't change the state till all above operations succeed */ - device->power.state = state; - end: - if (result) + end: + if (result) { + device->power.state = ACPI_STATE_UNKNOWN; printk(KERN_WARNING PREFIX "Transitioning device [%s] to D%d\n", device->pnp.bus_id, state); + } else { + /* We shouldn't change the state till all above operations succeed */ + device->power.state = state; + } return result; } -- cgit v1.2.3-70-g09d2 From ff24ba74b6d3befbfbafa142582211b5a6095d45 Mon Sep 17 00:00:00 2001 From: Konstantin Karasyov Date: Wed, 7 Mar 2007 03:50:11 -0500 Subject: ACPI: ThinkPad Z60m: usb mouse stops working after suspend to RAM (http://www.mail-archive.com/linux-acpi@vger.kernel.org/msg05270.html): References : http://lkml.org/lkml/2007/2/21/413 http://lkml.org/lkml/2007/2/28/172 Submitter : Arkadiusz Miskiewicz Caused-By : Konstantin Karasyov commit 0a6139027f3986162233adc17285151e78b39cac Do not disable power resources on resume even if there are no devices referencing it. Signed-off-by: Konstantin Karasyov Signed-off-by: Len Brown --- drivers/acpi/power.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'drivers/acpi/power.c') diff --git a/drivers/acpi/power.c b/drivers/acpi/power.c index 1ef338545df..ccecfe0d695 100644 --- a/drivers/acpi/power.c +++ b/drivers/acpi/power.c @@ -687,13 +687,6 @@ static int acpi_power_resume(struct acpi_device *device) return result; mutex_lock(&resource->resource_lock); - if ((resource->state == ACPI_POWER_RESOURCE_STATE_ON) && - list_empty(&resource->reference)) { - mutex_unlock(&resource->resource_lock); - result = acpi_power_off_device(device->handle, NULL); - return result; - } - if ((resource->state == ACPI_POWER_RESOURCE_STATE_OFF) && !list_empty(&resource->reference)) { ref = container_of(resource->reference.next, struct acpi_power_reference, node); -- cgit v1.2.3-70-g09d2