aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/core
diff options
context:
space:
mode:
authorRicardo Ribalda <ribalda@chromium.org>2024-12-16 21:17:15 +0000
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2024-12-19 20:59:35 +0100
commit79f237bae910e1019f1f7617d7b0b900f717d209 (patch)
tree608905030a7c703b4c537acb08312106bda1278a /drivers/usb/core
parentACPI: sysfs: Constify 'struct bin_attribute' (diff)
downloadlinux-79f237bae910e1019f1f7617d7b0b900f717d209.tar.gz
linux-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/usb/core')
-rw-r--r--drivers/usb/core/usb-acpi.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/core/usb-acpi.c b/drivers/usb/core/usb-acpi.c
index 03c22114214b..935c0efea0b6 100644
--- a/drivers/usb/core/usb-acpi.c
+++ b/drivers/usb/core/usb-acpi.c
@@ -213,8 +213,7 @@ usb_acpi_get_connect_type(struct usb_port *port_dev, acpi_handle *handle)
* no connectable, the port would be not used.
*/
- status = acpi_get_physical_device_location(handle, &pld);
- if (ACPI_SUCCESS(status) && pld)
+ if (acpi_get_physical_device_location(handle, &pld) && pld)
port_dev->location = USB_ACPI_LOCATION_VALID |
pld->group_token << 8 | pld->group_position;