Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 59e6423b authored by Feng Tang's avatar Feng Tang Committed by Len Brown
Browse files

usb-acpi: Comply with the ACPI API change



acpi_get_physical_device_location()'s 2nd argument has been changed
in ACPI implementaion, so need a follow-on change in
usb_acpi_check_pld().

Signed-off-by: default avatarFeng Tang <feng.tang@intel.com>
Signed-off-by: default avatarBob Moore <robert.moore@intel.com>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 8ede06ab
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -52,18 +52,19 @@ static int usb_acpi_check_upc(struct usb_device *udev, acpi_handle handle)
static int usb_acpi_check_pld(struct usb_device *udev, acpi_handle handle)
static int usb_acpi_check_pld(struct usb_device *udev, acpi_handle handle)
{
{
	acpi_status status;
	acpi_status status;
	struct acpi_pld pld;
	struct acpi_pld_info *pld;


	status = acpi_get_physical_device_location(handle, &pld);
	status = acpi_get_physical_device_location(handle, &pld);


	if (ACPI_FAILURE(status))
	if (ACPI_FAILURE(status))
		return -ENODEV;
		return -ENODEV;


	if (pld.user_visible)
	if (pld->user_visible)
		udev->removable = USB_DEVICE_REMOVABLE;
		udev->removable = USB_DEVICE_REMOVABLE;
	else
	else
		udev->removable = USB_DEVICE_FIXED;
		udev->removable = USB_DEVICE_FIXED;


	ACPI_FREE(pld);
	return 0;
	return 0;
}
}