diff options
author | 2024-12-16 21:17:15 +0000 | |
---|---|---|
committer | 2024-12-19 20:59:35 +0100 | |
commit | 79f237bae910e1019f1f7617d7b0b900f717d209 (patch) | |
tree | 608905030a7c703b4c537acb08312106bda1278a /drivers/acpi/scan.c | |
parent | ACPI: sysfs: Constify 'struct bin_attribute' (diff) | |
download | linux-rng-79f237bae910e1019f1f7617d7b0b900f717d209.tar.xz linux-rng-79f237bae910e1019f1f7617d7b0b900f717d209.zip |
ACPI: bus: change the prototype for acpi_get_physical_device_location
It generally is not OK to use acpi_status and/or AE_ error codes
without CONFIG_ACPI and they really only should be used in
drivers/acpi/ (and not everywhere in there for that matter).
So acpi_get_physical_device_location() needs to be redefined to return
something different from acpi_status (preferably bool) in order to be
used in !CONFIG_ACPI code.
Suggested-by: Rafael J. Wysocki <rafael@kernel.org>
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Link: https://patch.msgid.link/20241216-fix-ipu-v5-1-3d6b35ddce7b@chromium.org
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/scan.c')
-rw-r--r-- | drivers/acpi/scan.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 74dcccdc6482..93d340027b7f 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -723,10 +723,8 @@ int acpi_tie_acpi_dev(struct acpi_device *adev) static void acpi_store_pld_crc(struct acpi_device *adev) { struct acpi_pld_info *pld; - acpi_status status; - status = acpi_get_physical_device_location(adev->handle, &pld); - if (ACPI_FAILURE(status)) + if (!acpi_get_physical_device_location(adev->handle, &pld)) return; adev->pld_crc = crc32(~0, pld, sizeof(*pld)); |