aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/processor_idle.c
diff options
context:
space:
mode:
authorVenkatesh Pallipadi <venkatesh.pallipadi@intel.com>2005-07-29 16:00:13 -0400
committerLen Brown <len.brown@intel.com>2005-07-29 16:02:02 -0400
commit0b6b2f08c24a65535cb18893ca27516389c5fc0f (patch)
treee089b92bea0e4a52047ee8571427078313f8a79f /drivers/acpi/processor_idle.c
parent4a7164023959040e687e51663dee67cff4d2b770 (diff)
[ACPI] Fix memset arguments in acpi processor_idle.c
http://bugzilla.kernel.org/show_bug.cgi?id=4954 Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/processor_idle.c')
-rw-r--r--drivers/acpi/processor_idle.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index aea745f4a8b0..42b34f5df98b 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -549,7 +549,8 @@ static int acpi_processor_get_power_info_default_c1 (struct acpi_processor *pr)
549 ACPI_FUNCTION_TRACE("acpi_processor_get_power_info_default_c1"); 549 ACPI_FUNCTION_TRACE("acpi_processor_get_power_info_default_c1");
550 550
551 for (i = 0; i < ACPI_PROCESSOR_MAX_POWER; i++) 551 for (i = 0; i < ACPI_PROCESSOR_MAX_POWER; i++)
552 memset(pr->power.states, 0, sizeof(struct acpi_processor_cx)); 552 memset(&(pr->power.states[i]), 0,
553 sizeof(struct acpi_processor_cx));
553 554
554 /* if info is obtained from pblk/fadt, type equals state */ 555 /* if info is obtained from pblk/fadt, type equals state */
555 pr->power.states[ACPI_STATE_C1].type = ACPI_STATE_C1; 556 pr->power.states[ACPI_STATE_C1].type = ACPI_STATE_C1;
@@ -580,7 +581,8 @@ static int acpi_processor_get_power_info_cst (struct acpi_processor *pr)
580 581
581 pr->power.count = 0; 582 pr->power.count = 0;
582 for (i = 0; i < ACPI_PROCESSOR_MAX_POWER; i++) 583 for (i = 0; i < ACPI_PROCESSOR_MAX_POWER; i++)
583 memset(pr->power.states, 0, sizeof(struct acpi_processor_cx)); 584 memset(&(pr->power.states[i]), 0,
585 sizeof(struct acpi_processor_cx));
584 586
585 status = acpi_evaluate_object(pr->handle, "_CST", NULL, &buffer); 587 status = acpi_evaluate_object(pr->handle, "_CST", NULL, &buffer);
586 if (ACPI_FAILURE(status)) { 588 if (ACPI_FAILURE(status)) {