Skip to content

Commit 39c8788

Browse files
ChelsyRatnawatrafaeljw
authored andcommitted
ACPI: Use str_low_high() helper in two places
Replace hard-coded string choices with the str_low_high() helper in two places in the ACPI code. Signed-off-by: Chelsy Ratnawat <chelsyratnawat2001@gmail.com> Link: https://patch.msgid.link/20250823220311.2035533-1-chelsyratnawat2001@gmail.com [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 1b237f1 commit 39c8788

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

drivers/acpi/pci_irq.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include <linux/acpi.h>
2323
#include <linux/slab.h>
2424
#include <linux/interrupt.h>
25+
#include <linux/string_choices.h>
2526

2627
struct acpi_prt_entry {
2728
struct acpi_pci_id id;
@@ -468,7 +469,7 @@ int acpi_pci_irq_enable(struct pci_dev *dev)
468469
dev_dbg(&dev->dev, "PCI INT %c%s -> GSI %u (%s, %s) -> IRQ %d\n",
469470
pin_name(pin), link_desc, gsi,
470471
(triggering == ACPI_LEVEL_SENSITIVE) ? "level" : "edge",
471-
(polarity == ACPI_ACTIVE_LOW) ? "low" : "high", dev->irq);
472+
str_low_high(polarity == ACPI_ACTIVE_LOW), dev->irq);
472473

473474
kfree(entry);
474475
return 0;

drivers/acpi/resource.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include <linux/slab.h>
1818
#include <linux/irq.h>
1919
#include <linux/dmi.h>
20+
#include <linux/string_choices.h>
2021

2122
#ifdef CONFIG_X86
2223
#define valid_IRQ(i) (((i) != 0) && ((i) != 2))
@@ -773,7 +774,7 @@ static void acpi_dev_get_irqresource(struct resource *res, u32 gsi,
773774
pr_warn("ACPI: IRQ %d override to %s%s, %s%s\n", gsi,
774775
t ? "level" : "edge",
775776
trig == triggering ? "" : "(!)",
776-
p ? "low" : "high",
777+
str_low_high(p),
777778
pol == polarity ? "" : "(!)");
778779
triggering = trig;
779780
polarity = pol;

0 commit comments

Comments
 (0)