diff options
author | Heikki Krogerus <heikki.krogerus@linux.intel.com> | 2022-08-16 13:16:25 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2022-09-10 18:22:23 +0200 |
commit | 6d2b5a1cf4dd943909a927133664ad1627783d95 (patch) | |
tree | ddebb675cdf4c0fd78d1b88a3798bcf10d56e02c /drivers/acpi/resource.c | |
parent | 7e18e42e4b280c85b76967a9106a13ca61c16179 (diff) |
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>
Diffstat (limited to 'drivers/acpi/resource.c')
-rw-r--r-- | drivers/acpi/resource.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c index 510cdec375c4..e644e90d1884 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)); |