summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2022-04-08 19:50:44 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2022-04-08 19:50:44 +0200
commit87ad236001eb95cf1760ccaf7670c94722231097 (patch)
treee746f9a1b7366fbc4945399724fbc28a0b76d342 /drivers
parentdfbba2518aac4204203b0697a894d3b2f80134d3 (diff)
parentac2a3feefad549814f5e7cca30be07a255c8494a (diff)
Merge branch 'acpi-bus'
* acpi-bus: ACPI: bus: Eliminate acpi_bus_get_device()
Diffstat (limited to 'drivers')
-rw-r--r--drivers/acpi/scan.c13
-rw-r--r--drivers/spi/spi.c3
2 files changed, 2 insertions, 14 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 9efbfe087de7..762b61f67e6c 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -588,19 +588,6 @@ static struct acpi_device *handle_to_device(acpi_handle handle,
return adev;
}
-int acpi_bus_get_device(acpi_handle handle, struct acpi_device **device)
-{
- if (!device)
- return -EINVAL;
-
- *device = handle_to_device(handle, NULL);
- if (!*device)
- return -ENODEV;
-
- return 0;
-}
-EXPORT_SYMBOL(acpi_bus_get_device);
-
/**
* acpi_fetch_acpi_dev - Retrieve ACPI device object.
* @handle: ACPI handle associated with the requested ACPI device object.
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index c4dd1200fe99..9bb5400af205 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -2406,7 +2406,8 @@ static int acpi_spi_add_resource(struct acpi_resource *ares, void *data)
} else {
struct acpi_device *adev;
- if (acpi_bus_get_device(parent_handle, &adev))
+ adev = acpi_fetch_acpi_dev(parent_handle);
+ if (!adev)
return -ENODEV;
ctlr = acpi_spi_find_controller_by_adev(adev);