Commit ed0a1ac2 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Rafael J. Wysocki
Browse files

ACPI: PCI: simplify code with acpi_get_local_u64_address()

parent 24d479d2
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -42,8 +42,9 @@ static int
check_slot(acpi_handle handle, unsigned long long *sun)
{
	int device = -1;
	unsigned long long adr, sta;
	unsigned long long sta;
	acpi_status status;
	u64 adr;
	struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };

	acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer);
@@ -56,10 +57,9 @@ check_slot(acpi_handle handle, unsigned long long *sun)
			goto out;
	}

	status = acpi_evaluate_integer(handle, "_ADR", NULL, &adr);
	if (ACPI_FAILURE(status)) {
		pr_debug("_ADR returned %d on %s\n",
			 status, (char *)buffer.pointer);
	if (acpi_get_local_u64_address(handle, &adr)) {
		pr_debug("_ADR returned with failure on %s\n",
			 (char *)buffer.pointer);
		goto out;
	}