summaryrefslogtreecommitdiff
path: root/drivers/pci/pci-acpi.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2022-01-27 02:40:13 +0300
committerBjorn Helgaas <bhelgaas@google.com>2022-02-05 02:10:44 +0300
commit9a607a54a16314ca4f9ec1843e7c01131d851f33 (patch)
treefe5244d23588c3a29caa925e64b2ed01fe114ae3 /drivers/pci/pci-acpi.c
parente783362eb54cd99b2cac8b3a9aeac942e6f6ac07 (diff)
downloadlinux-9a607a54a16314ca4f9ec1843e7c01131d851f33.tar.xz
PCI/ACPI: Replace acpi_bus_get_device() with acpi_fetch_acpi_dev()
Replace acpi_bus_get_device() that is going to be dropped with acpi_fetch_acpi_dev(). No intentional functional impact. Link: https://lore.kernel.org/r/11930209.O9o76ZdvQC@kreacher Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/pci/pci-acpi.c')
-rw-r--r--drivers/pci/pci-acpi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c
index a42dbf448860..1f15ab7eabf8 100644
--- a/drivers/pci/pci-acpi.c
+++ b/drivers/pci/pci-acpi.c
@@ -89,9 +89,9 @@ int acpi_get_rc_resources(struct device *dev, const char *hid, u16 segment,
return -ENODEV;
}
- ret = acpi_bus_get_device(handle, &adev);
- if (ret)
- return ret;
+ adev = acpi_fetch_acpi_dev(handle);
+ if (!adev)
+ return -ENODEV;
ret = acpi_get_rc_addr(adev, res);
if (ret) {