Commit ff8f6248 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

ACPI: scan: Use resource_type() for resource type checking



To follow a well-established existing pattern, use resource_type() for
resource type checking in acpi_scan_claim_resources().

No intentional functional impact.

Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: default avatarJonathan Cameron <jonathan.cameron@huawei.com>
Link: https://patch.msgid.link/12814730.O9o76ZdvQC@rafael.j.wysocki
parent eed8f21a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2623,7 +2623,7 @@ static void acpi_scan_claim_resources(struct acpi_device *adev)
		if ((res->flags & IORESOURCE_DISABLED) || res->end < res->start)
			continue;

		if (res->flags & IORESOURCE_IO) {
		if (resource_type(res) == IORESOURCE_IO) {
			/*
			 * Follow the PNP system driver and on x86 skip I/O
			 * resources that start below 0x100 (the "standard PC
@@ -2634,7 +2634,7 @@ static void acpi_scan_claim_resources(struct acpi_device *adev)
				continue;
			}
			r = request_region(res->start, resource_size(res), regionid);
		} else if (res->flags & IORESOURCE_MEM) {
		} else if (resource_type(res) == IORESOURCE_MEM) {
			r = request_mem_region(res->start, resource_size(res), regionid);
		} else {
			continue;