Commit 39c87887 authored by Chelsy Ratnawat's avatar Chelsy Ratnawat Committed by Rafael J. Wysocki
Browse files

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: default avatarChelsy Ratnawat <chelsyratnawat2001@gmail.com>
Link: https://patch.msgid.link/20250823220311.2035533-1-chelsyratnawat2001@gmail.com


[ rjw: Subject and changelog edits ]
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 1b237f19
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@
#include <linux/acpi.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/string_choices.h>

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

	kfree(entry);
	return 0;
+2 −1
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
#include <linux/slab.h>
#include <linux/irq.h>
#include <linux/dmi.h>
#include <linux/string_choices.h>

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