summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2026-01-21 09:50:49 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2026-01-23 20:11:21 +0100
commited0a1ac2aa936a0abc2d940eff51158de6e8cec0 (patch)
tree3896c275939c613a4663ba348a8192d8cfa481a2
parent24d479d26b25bce5faea3ddd9fa8f3a6c3129ea7 (diff)
ACPI: PCI: simplify code with acpi_get_local_u64_address()
Now we have a helper so there's no need to open-code. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Bjorn Helgaas <bhelgaas@google.com> Link: https://patch.msgid.link/20260121085105.2282380-1-andriy.shevchenko@linux.intel.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--drivers/acpi/pci_slot.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/acpi/pci_slot.c b/drivers/acpi/pci_slot.c
index 741bcc9d6d6a..15234b65ea22 100644
--- a/drivers/acpi/pci_slot.c
+++ b/drivers/acpi/pci_slot.c
@@ -42,8 +42,9 @@ static int
check_slot(acpi_handle handle, unsigned long long *sun)
{
int device = -1;
- unsigned long long adr, sta;
+ unsigned long long sta;
acpi_status status;
+ u64 adr;
struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer);
@@ -56,10 +57,9 @@ check_slot(acpi_handle handle, unsigned long long *sun)
goto out;
}
- status = acpi_evaluate_integer(handle, "_ADR", NULL, &adr);
- if (ACPI_FAILURE(status)) {
- pr_debug("_ADR returned %d on %s\n",
- status, (char *)buffer.pointer);
+ if (acpi_get_local_u64_address(handle, &adr)) {
+ pr_debug("_ADR returned with failure on %s\n",
+ (char *)buffer.pointer);
goto out;
}