Skip to content

Commit 6d2b5a1

Browse files
Heikki Krogerusrafaeljw
authored andcommitted
ACPI: resource: Filter out the non memory resources in is_memory()
This will generalise the function so it should become useful in more places. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 7e18e42 commit 6d2b5a1

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

drivers/acpi/resource.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -690,6 +690,9 @@ static int is_memory(struct acpi_resource *ares, void *not_used)
690690

691691
memset(&win, 0, sizeof(win));
692692

693+
if (acpi_dev_filter_resource_type(ares, IORESOURCE_MEM))
694+
return 1;
695+
693696
return !(acpi_dev_resource_memory(ares, res)
694697
|| acpi_dev_resource_address_space(ares, &win)
695698
|| acpi_dev_resource_ext_address_space(ares, &win));

0 commit comments

Comments
 (0)