Skip to content

Commit

Permalink
ACPI: processor: open code acpi_processor_cleanup_pdc
Browse files Browse the repository at this point in the history
We have the acpi_object_list * right there in acpi_processor_set_pdc()
so it doesn't seem necessary for an entire helper function just to
free it.

Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
  • Loading branch information
Alex Chiang authored and Len Brown committed Dec 22, 2009
1 parent fa11856 commit b9c2db7
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions drivers/acpi/processor_pdc.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,16 +125,6 @@ acpi_processor_eval_pdc(acpi_handle handle, struct acpi_object_list *pdc_in)
return status;
}

static void acpi_processor_cleanup_pdc(struct acpi_processor *pr)
{
if (pr->pdc) {
kfree(pr->pdc->pointer->buffer.pointer);
kfree(pr->pdc->pointer);
kfree(pr->pdc);
pr->pdc = NULL;
}
}

void acpi_processor_set_pdc(struct acpi_processor *pr)
{
struct acpi_object_list *obj_list;
Expand All @@ -147,7 +137,10 @@ void acpi_processor_set_pdc(struct acpi_processor *pr)
return;

acpi_processor_eval_pdc(pr->handle, obj_list);
acpi_processor_cleanup_pdc(pr);

kfree(obj_list->pointer->buffer.pointer);
kfree(obj_list->pointer);
kfree(obj_list);
}
EXPORT_SYMBOL_GPL(acpi_processor_set_pdc);

Expand Down

0 comments on commit b9c2db7

Please sign in to comment.