Skip to content

Commit

Permalink
ACPI: Fixes device power states array overflow
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Lin Ming authored and Len Brown committed Jul 14, 2011
1 parent 8d86e5f commit b4a03b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/acpi/acpi_bus.h
Original file line number Diff line number Diff line change
Expand Up @@ -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[ACPI_D_STATE_COUNT]; /* Power states (D0-D3Cold) */
};

/* Performance Management */
Expand Down

0 comments on commit b4a03b9

Please sign in to comment.