Messages in this thread Patch in this message | | | From | Heikki Krogerus <> | Subject | [PATCH 2/6] ACPI: resource: Filter out the non memory resources in is_memory() | Date | Tue, 16 Aug 2022 13:16:25 +0300 |
| |
This will generalise the function so it should become useful in more places.
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> --- drivers/acpi/resource.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c index 510cdec375c4d..e644e90d18847 100644 --- a/drivers/acpi/resource.c +++ b/drivers/acpi/resource.c @@ -690,6 +690,9 @@ static int is_memory(struct acpi_resource *ares, void *not_used) memset(&win, 0, sizeof(win)); + if (acpi_dev_filter_resource_type(ares, IORESOURCE_MEM)) + return 1; + return !(acpi_dev_resource_memory(ares, res) || acpi_dev_resource_address_space(ares, &win) || acpi_dev_resource_ext_address_space(ares, &win)); -- 2.35.1
| |