aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/acpi/processor_core.c27
-rw-r--r--drivers/pnp/resource.c2
2 files changed, 1 insertions, 28 deletions
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c
index 86d73d5d503f..71e2065639a6 100644
--- a/drivers/acpi/processor_core.c
+++ b/drivers/acpi/processor_core.c
@@ -70,28 +70,6 @@ static int map_lsapic_id(struct acpi_subtable_header *entry,
70 return 0; 70 return 0;
71} 71}
72 72
73static int map_gic_id(struct acpi_subtable_header *entry,
74 int device_declaration, u32 acpi_id, int *apic_id)
75{
76 struct acpi_madt_generic_interrupt *gic =
77 (struct acpi_madt_generic_interrupt *)entry;
78
79 if (!(gic->flags & ACPI_MADT_ENABLED))
80 return -ENODEV;
81
82 /*
83 * In the GIC interrupt model, logical processors are
84 * required to have a Processor Device object in the DSDT,
85 * so we should check device_declaration here
86 */
87 if (device_declaration && (gic->uid == acpi_id)) {
88 *apic_id = gic->gic_id;
89 return 0;
90 }
91
92 return -EINVAL;
93}
94
95static int map_madt_entry(int type, u32 acpi_id) 73static int map_madt_entry(int type, u32 acpi_id)
96{ 74{
97 unsigned long madt_end, entry; 75 unsigned long madt_end, entry;
@@ -127,9 +105,6 @@ static int map_madt_entry(int type, u32 acpi_id)
127 } else if (header->type == ACPI_MADT_TYPE_LOCAL_SAPIC) { 105 } else if (header->type == ACPI_MADT_TYPE_LOCAL_SAPIC) {
128 if (!map_lsapic_id(header, type, acpi_id, &apic_id)) 106 if (!map_lsapic_id(header, type, acpi_id, &apic_id))
129 break; 107 break;
130 } else if (header->type == ACPI_MADT_TYPE_GENERIC_INTERRUPT) {
131 if (!map_gic_id(header, type, acpi_id, &apic_id))
132 break;
133 } 108 }
134 entry += header->length; 109 entry += header->length;
135 } 110 }
@@ -160,8 +135,6 @@ static int map_mat_entry(acpi_handle handle, int type, u32 acpi_id)
160 map_lapic_id(header, acpi_id, &apic_id); 135 map_lapic_id(header, acpi_id, &apic_id);
161 } else if (header->type == ACPI_MADT_TYPE_LOCAL_SAPIC) { 136 } else if (header->type == ACPI_MADT_TYPE_LOCAL_SAPIC) {
162 map_lsapic_id(header, type, acpi_id, &apic_id); 137 map_lsapic_id(header, type, acpi_id, &apic_id);
163 } else if (header->type == ACPI_MADT_TYPE_GENERIC_INTERRUPT) {
164 map_gic_id(header, type, acpi_id, &apic_id);
165 } 138 }
166 139
167exit: 140exit:
diff --git a/drivers/pnp/resource.c b/drivers/pnp/resource.c
index bacddd102ae9..01712cbfd92e 100644
--- a/drivers/pnp/resource.c
+++ b/drivers/pnp/resource.c
@@ -385,7 +385,7 @@ int pnp_check_irq(struct pnp_dev *dev, struct resource *res)
385 * device is active because it itself may be in use */ 385 * device is active because it itself may be in use */
386 if (!dev->active) { 386 if (!dev->active) {
387 if (request_irq(*irq, pnp_test_handler, 387 if (request_irq(*irq, pnp_test_handler,
388 IRQF_DISABLED | IRQF_PROBE_SHARED, "pnp", NULL)) 388 IRQF_PROBE_SHARED, "pnp", NULL))
389 return 0; 389 return 0;
390 free_irq(*irq, NULL); 390 free_irq(*irq, NULL);
391 } 391 }