mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
Merge branches 'acpi-battery' and 'acpi-processor'
* acpi-battery: ACPI / battery: mark DMI table as __initconst ACPI / battery: minor tweaks to acpi_battery_units() ACPI / battery: constify the offset tables ACPI / battery: ensure acpi_battery_init() has finish ACPI / battery: drop useless return statements ACPI / battery: abort initialization earlier if acpi_disabled * acpi-processor: ACPI / processor: constify DMI system id table ACPI / processor: Introduce invalid_phys_cpuid() ACPI / processor: return specific error instead of -1 ACPI / processor: remove phys_id in acpi_processor_get_info() ACPI / processor: remove cpu_index in acpi_processor_get_info() Xen / ACPI / processor: Remove unneeded NULL check Xen / ACPI / processor: use invalid_logical_cpuid() ACPI / processor: Introduce invalid_logical_cpuid()
This commit is contained in:
commit
763d949581
7 changed files with 54 additions and 53 deletions
|
|
@ -46,13 +46,7 @@ static int xen_acpi_processor_enable(struct acpi_device *device)
|
|||
unsigned long long value;
|
||||
union acpi_object object = { 0 };
|
||||
struct acpi_buffer buffer = { sizeof(union acpi_object), &object };
|
||||
struct acpi_processor *pr;
|
||||
|
||||
pr = acpi_driver_data(device);
|
||||
if (!pr) {
|
||||
pr_err(PREFIX "Cannot find driver data\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
struct acpi_processor *pr = acpi_driver_data(device);
|
||||
|
||||
if (!strcmp(acpi_device_hid(device), ACPI_PROCESSOR_OBJECT_HID)) {
|
||||
/* Declared with "Processor" statement; match ProcessorID */
|
||||
|
|
@ -77,7 +71,7 @@ static int xen_acpi_processor_enable(struct acpi_device *device)
|
|||
|
||||
pr->id = xen_pcpu_id(pr->acpi_id);
|
||||
|
||||
if ((int)pr->id < 0)
|
||||
if (invalid_logical_cpuid(pr->id))
|
||||
/* This cpu is not presented at hypervisor, try to hotadd it */
|
||||
if (ACPI_FAILURE(xen_acpi_cpu_hotadd(pr))) {
|
||||
pr_err(PREFIX "Hotadd CPU (acpi_id = %d) failed.\n",
|
||||
|
|
@ -226,7 +220,7 @@ static acpi_status xen_acpi_cpu_hotadd(struct acpi_processor *pr)
|
|||
return AE_ERROR;
|
||||
|
||||
pr->id = xen_hotadd_cpu(pr);
|
||||
if ((int)pr->id < 0)
|
||||
if (invalid_logical_cpuid(pr->id))
|
||||
return AE_ERROR;
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue