aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/processor_core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/processor_core.c')
-rw-r--r--drivers/acpi/processor_core.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c
index e32321ce9a5c..ef58f46c8442 100644
--- a/drivers/acpi/processor_core.c
+++ b/drivers/acpi/processor_core.c
@@ -16,7 +16,7 @@ static int map_lapic_id(struct acpi_subtable_header *entry,
16 u32 acpi_id, int *apic_id) 16 u32 acpi_id, int *apic_id)
17{ 17{
18 struct acpi_madt_local_apic *lapic = 18 struct acpi_madt_local_apic *lapic =
19 (struct acpi_madt_local_apic *)entry; 19 container_of(entry, struct acpi_madt_local_apic, header);
20 20
21 if (!(lapic->lapic_flags & ACPI_MADT_ENABLED)) 21 if (!(lapic->lapic_flags & ACPI_MADT_ENABLED))
22 return -ENODEV; 22 return -ENODEV;
@@ -32,7 +32,7 @@ static int map_x2apic_id(struct acpi_subtable_header *entry,
32 int device_declaration, u32 acpi_id, int *apic_id) 32 int device_declaration, u32 acpi_id, int *apic_id)
33{ 33{
34 struct acpi_madt_local_x2apic *apic = 34 struct acpi_madt_local_x2apic *apic =
35 (struct acpi_madt_local_x2apic *)entry; 35 container_of(entry, struct acpi_madt_local_x2apic, header);
36 36
37 if (!(apic->lapic_flags & ACPI_MADT_ENABLED)) 37 if (!(apic->lapic_flags & ACPI_MADT_ENABLED))
38 return -ENODEV; 38 return -ENODEV;
@@ -49,7 +49,7 @@ static int map_lsapic_id(struct acpi_subtable_header *entry,
49 int device_declaration, u32 acpi_id, int *apic_id) 49 int device_declaration, u32 acpi_id, int *apic_id)
50{ 50{
51 struct acpi_madt_local_sapic *lsapic = 51 struct acpi_madt_local_sapic *lsapic =
52 (struct acpi_madt_local_sapic *)entry; 52 container_of(entry, struct acpi_madt_local_sapic, header);
53 53
54 if (!(lsapic->lapic_flags & ACPI_MADT_ENABLED)) 54 if (!(lsapic->lapic_flags & ACPI_MADT_ENABLED))
55 return -ENODEV; 55 return -ENODEV;