Skip to content

Commit fa11856

Browse files
Alex Chianglenb
authored andcommitted
ACPI: processor: change acpi_processor_eval_pdc interface
acpi_processor_eval_pdc() really only needs a handle and an acpi_object_list * to do its work. No need to pass in a struct acpi_processor *, so let's be more specific about what we want. Signed-off-by: Alex Chiang <achiang@hp.com> Signed-off-by: Len Brown <len.brown@intel.com>
1 parent 3b407ae commit fa11856

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

‎drivers/acpi/processor_pdc.c‎

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,11 @@ static struct acpi_object_list *acpi_processor_alloc_pdc(void)
9797
* _PDC is required for a BIOS-OS handshake for most of the newer
9898
* ACPI processor features.
9999
*/
100-
static int acpi_processor_eval_pdc(struct acpi_processor *pr)
100+
static int
101+
acpi_processor_eval_pdc(acpi_handle handle, struct acpi_object_list *pdc_in)
101102
{
102-
struct acpi_object_list *pdc_in = pr->pdc;
103103
acpi_status status = AE_OK;
104104

105-
if (!pdc_in)
106-
return status;
107105
if (idle_nomwait) {
108106
/*
109107
* If mwait is disabled for CPU C-states, the C2C3_FFH access
@@ -118,7 +116,7 @@ static int acpi_processor_eval_pdc(struct acpi_processor *pr)
118116
buffer[2] &= ~(ACPI_PDC_C_C2C3_FFH | ACPI_PDC_C_C1_FFH);
119117

120118
}
121-
status = acpi_evaluate_object(pr->handle, "_PDC", pdc_in, NULL);
119+
status = acpi_evaluate_object(handle, "_PDC", pdc_in, NULL);
122120

123121
if (ACPI_FAILURE(status))
124122
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
@@ -148,9 +146,7 @@ void acpi_processor_set_pdc(struct acpi_processor *pr)
148146
if (!obj_list)
149147
return;
150148

151-
pr->pdc = obj_list;
152-
153-
acpi_processor_eval_pdc(pr);
149+
acpi_processor_eval_pdc(pr->handle, obj_list);
154150
acpi_processor_cleanup_pdc(pr);
155151
}
156152
EXPORT_SYMBOL_GPL(acpi_processor_set_pdc);

0 commit comments

Comments
 (0)