From patchwork Mon Oct 4 18:22:28 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Garrett X-Patchwork-Id: 229661 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o94IOBdM002158 for ; Mon, 4 Oct 2010 18:24:12 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932173Ab0JDSX1 (ORCPT ); Mon, 4 Oct 2010 14:23:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40717 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756813Ab0JDSXF (ORCPT ); Mon, 4 Oct 2010 14:23:05 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o94IN4tw018868 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 4 Oct 2010 14:23:05 -0400 Received: from cavan.codon.org.uk ([10.3.113.5]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o94IN3aC032050 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO); Mon, 4 Oct 2010 14:23:04 -0400 Received: from nat-pool-rdu.redhat.com ([66.187.233.202] helo=localhost.localdomain) by cavan.codon.org.uk with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1P2pgi-0003Es-K8; Mon, 04 Oct 2010 19:23:00 +0100 From: Matthew Garrett To: linux-acpi@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, Matthew Garrett Subject: [PATCH 4/5] ACPI: Missing _S0W shouldn't disable runtime PM Date: Mon, 4 Oct 2010 14:22:28 -0400 Message-Id: <1286216549-5438-5-git-send-email-mjg@redhat.com> In-Reply-To: <1286216549-5438-1-git-send-email-mjg@redhat.com> References: <1286216549-5438-1-git-send-email-mjg@redhat.com> X-SA-Do-Not-Run: Yes X-SA-Exim-Connect-IP: 66.187.233.202 X-SA-Exim-Mail-From: mjg@redhat.com X-SA-Exim-Scanned: No (on cavan.codon.org.uk); SAEximRunCond expanded to false X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Mon, 04 Oct 2010 18:24:12 +0000 (UTC) diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c index cf82989..ab0ba78 100644 --- a/drivers/acpi/sleep.c +++ b/drivers/acpi/sleep.c @@ -609,9 +609,9 @@ int acpi_pm_device_sleep_state(struct device *dev, int *d_min_p) acpi_method[3] = 'W'; status = acpi_evaluate_integer(handle, acpi_method, NULL, &d_max); - if (ACPI_FAILURE(status)) { + if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { d_max = d_min; - } else if (d_max < d_min) { + } else if (ACPI_SUCCESS(status) && d_max < d_min) { /* Warn the user of the broken DSDT */ printk(KERN_WARNING "ACPI: Wrong value from %s\n", acpi_method);