]> err.no Git - linux-2.6/commitdiff
[ACPI] Fix memset arguments in acpi processor_idle.c
authorVenkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Fri, 29 Jul 2005 20:00:13 +0000 (16:00 -0400)
committerLen Brown <len.brown@intel.com>
Fri, 29 Jul 2005 20:02:02 +0000 (16:02 -0400)
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>
drivers/acpi/processor_idle.c

index aea745f4a8b0ba3859d47d1caf0e458c60ebb2d2..42b34f5df98b94da8598aab89e2d55e5e4649bb4 100644 (file)
@@ -549,7 +549,8 @@ static int acpi_processor_get_power_info_default_c1 (struct acpi_processor *pr)
        ACPI_FUNCTION_TRACE("acpi_processor_get_power_info_default_c1");
 
        for (i = 0; i < ACPI_PROCESSOR_MAX_POWER; i++)
-               memset(pr->power.states, 0, sizeof(struct acpi_processor_cx));
+               memset(&(pr->power.states[i]), 0, 
+                      sizeof(struct acpi_processor_cx));
 
        /* if info is obtained from pblk/fadt, type equals state */
        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)
 
        pr->power.count = 0;
        for (i = 0; i < ACPI_PROCESSOR_MAX_POWER; i++)
-               memset(pr->power.states, 0, sizeof(struct acpi_processor_cx));
+               memset(&(pr->power.states[i]), 0, 
+                      sizeof(struct acpi_processor_cx));
 
        status = acpi_evaluate_object(pr->handle, "_CST", NULL, &buffer);
        if (ACPI_FAILURE(status)) {