diff options
author | Lin Ming <ming.m.lin@intel.com> | 2011-06-01 11:54:02 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2011-07-13 23:53:22 -0400 |
commit | b4a03b9aa96cc186bf3cfd7a55cb7d7227f0cf4d (patch) | |
tree | 3bee07efb713e740f631f00e22989c7be1161c91 /include/acpi | |
parent | 8d86e5f91440aa56a5df516bf58fe3883552ad56 (diff) |
ACPI: Fixes device power states array overflow
Commit 28c2103 added new state ACPI_STATE_D3_COLD, so the device power
states array must be expanded by one also.
v2: Use ACPI_D_STATE_COUNT instead of number 5 for the array size.
Reported-by: Dan Carpenter <error27@gmail.com>
Suggested-by: Oldřich Jedlička <oldium.pro@seznam.cz>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'include/acpi')
-rw-r--r-- | 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 3a10ef5914eb..6cd5b6403a7b 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h | |||
@@ -210,7 +210,7 @@ struct acpi_device_power_state { | |||
210 | struct acpi_device_power { | 210 | struct acpi_device_power { |
211 | int state; /* Current state */ | 211 | int state; /* Current state */ |
212 | struct acpi_device_power_flags flags; | 212 | struct acpi_device_power_flags flags; |
213 | struct acpi_device_power_state states[4]; /* Power states (D0-D3) */ | 213 | struct acpi_device_power_state states[ACPI_D_STATE_COUNT]; /* Power states (D0-D3Cold) */ |
214 | }; | 214 | }; |
215 | 215 | ||
216 | /* Performance Management */ | 216 | /* Performance Management */ |