From patchwork Mon May 30 13:42:41 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lin Ming X-Patchwork-Id: 829992 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 p4UDh9tI026883 for ; Mon, 30 May 2011 13:43:09 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752374Ab1E3NnI (ORCPT ); Mon, 30 May 2011 09:43:08 -0400 Received: from mga09.intel.com ([134.134.136.24]:13321 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752169Ab1E3NnH (ORCPT ); Mon, 30 May 2011 09:43:07 -0400 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 30 May 2011 06:43:07 -0700 X-ExtLoop1: 1 Received: from unknown (HELO [10.255.20.172]) ([10.255.20.172]) by orsmga002.jf.intel.com with ESMTP; 30 May 2011 06:43:03 -0700 Subject: [PATCH] ACPI: Fixes device power states array overflow From: Lin Ming To: Len Brown Cc: linux-acpi@vger.kernel.org, Dan Carpenter Date: Mon, 30 May 2011 21:42:41 +0800 Message-Id: <1306762961.2244.13.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.28.0 (2.28.0-2.fc12) Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Mon, 30 May 2011 13:43:09 +0000 (UTC) Commit 28c2103 added new state ACPI_STATE_D3_COLD, so the device power states array must be expanded by one also. Reported-by: Dan Carpenter Signed-off-by: Lin Ming --- include/acpi/acpi_bus.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index 3a10ef5..ff246e8 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h @@ -210,7 +210,7 @@ struct acpi_device_power_state { struct acpi_device_power { int state; /* Current state */ struct acpi_device_power_flags flags; - struct acpi_device_power_state states[4]; /* Power states (D0-D3) */ + struct acpi_device_power_state states[5]; /* Power states (D0-D3Cold) */ }; /* Performance Management */