Skip to contentSkip to conversation

ACPI: GED: use correct trigger type field in _Exx / _Lxx handling

PATCH Applied Ard Biesheuvel 2 participants 2 messages May 27, 2020 ACPI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ACPI: GED: use correct trigger type field in _Exx / _Lxx handling

Commit ea6f3af4c5e63f69 ("ACPI: GED: add support for _Exx / _Lxx handler methods") added a reference to the 'triggering' field of either the normal or the extended ACPI IRQ resource struct, but inadvertently used the wrong pointer in the latter case. Note that both pointers refer to the same union, and the 'triggering' field appears at the same offset in both struct types, so it currently happens to work by accident. But let's fix it nonetheless

Fixes ea6f3af4c5e63f69 ("ACPI: GED: add support for _Exx / _Lxx handler methods")
---
 drivers/acpi/evged.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/evged.c +1 -1
index 6d7a522952bf..ccd900690b6f 100644
@@ -94,7 +94,7 @@ static acpi_status acpi_ged_request_interrupt(struct acpi_resource *ares,
 		trigger = p->triggering;
 	} else {
 		gsi = pext->interrupts[0];
-		trigger = p->triggering;
+		trigger = pext->triggering;
 	}
 
 	irq = r.start;
Signature · 1 line
2.17.1
maintainer Applied
#1 lore raw
Quoted 20 lines · Ard Biesheuvel

Commit ea6f3af4c5e63f69 ("ACPI: GED: add support for _Exx / _Lxx handler methods") added a reference to the 'triggering' field of either the normal or the extended ACPI IRQ resource struct, but inadvertently used the wrong pointer in the latter case. Note that both pointers refer to the same union, and the 'triggering' field appears at the same offset in both struct types, so it currently happens to work by accident. But let's fix it nonetheless

Fixes ea6f3af4c5e63f69 ("ACPI: GED: add support for _Exx / _Lxx handler methods")
---
 drivers/acpi/evged.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/evged.c +0 -0
index 6d7a522952bf..ccd900690b6f 100644

drivers/acpi/evged.c static acpi_status acpi_ged_request_interrupt(struct acpi_resource *ares,

Quoted 9 lines
drivers/acpi/evged.c +1 -2
@@ -94,7 +94,7 @@ static acpi_status acpi_ged_request_interrupt(struct acpi_resource *ares,
                trigger = p->triggering;
        } else {
                gsi = pext->interrupts[0];
-               trigger = p->triggering;
+               trigger = pext->triggering;
        }
 
        irq = r.start;
--

Applied, thanks!