Revision 89935315f192abf7068d0044cefc84f162c3c81f authored by Zhang Rui on 11 March 2014, 14:40:27 UTC, committed by Rafael J. Wysocki on 11 March 2014, 20:22:10 UTC
Before commit b355cee88e3b (ACPI / resources: ignore invalid ACPI
device resources), if acpi_dev_resource_memory()/acpi_dev_resource_io()
returns false, it means the the resource is not a memeory/IO resource.

But after commit b355cee88e3b, those functions return false if the
given memory/IO resource entry is invalid (the length of the resource
is zero).

This breaks pnpacpi_allocated_resource(), because it now recognizes
the invalid memory/io resources as resources of unknown type.  Thus
users see confusing warning messages on machines with zero length
ACPI memory/IO resources.

Fix the problem by rearranging pnpacpi_allocated_resource() so that
it calls acpi_dev_resource_memory() for memory type and IO type
resources only, respectively.

Fixes: b355cee88e3b (ACPI / resources: ignore invalid ACPI device resources)
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reported-and-tested-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Reported-and-tested-by: Julian Wollrath <jwollrath@web.de>
Reported-and-tested-by: Paul Bolle <pebolle@tiscali.nl>
[rjw: Changelog]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent fa389e2
History
File Mode Size
.gitignore -rw-r--r-- 25 bytes
Kconfig -rw-r--r-- 2.8 KB
Makefile -rw-r--r-- 2.1 KB
audit.c -rw-r--r-- 12.4 KB
common.c -rw-r--r-- 75.2 KB
common.h -rw-r--r-- 40.1 KB
condition.c -rw-r--r-- 27.1 KB
domain.c -rw-r--r-- 24.7 KB
environ.c -rw-r--r-- 3.0 KB
file.c -rw-r--r-- 28.9 KB
gc.c -rw-r--r-- 16.7 KB
group.c -rw-r--r-- 5.6 KB
load_policy.c -rw-r--r-- 2.6 KB
memory.c -rw-r--r-- 5.4 KB
mount.c -rw-r--r-- 6.7 KB
network.c -rw-r--r-- 21.3 KB
realpath.c -rw-r--r-- 7.8 KB
securityfs_if.c -rw-r--r-- 7.4 KB
tomoyo.c -rw-r--r-- 14.6 KB
util.c -rw-r--r-- 27.0 KB

back to top