android_kernel_samsung_msm8976/drivers/pnp
Zhang Rui ae59ae911d PNP / ACPI: proper handling of ACPI IO/Memory resource parsing failures
commit 89935315f192abf7068d0044cefc84f162c3c81f upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-23 21:38:22 -07:00
..
isapnp Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-05-01 17:51:54 -07:00
pnpacpi PNP / ACPI: proper handling of ACPI IO/Memory resource parsing failures 2014-03-23 21:38:22 -07:00
pnpbios Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2013-05-02 10:16:16 -07:00
Kconfig
Makefile
base.h ACPI: Move device resources interpretation code from PNP to ACPI core 2012-11-15 00:30:01 +01:00
card.c Fix common misspellings 2011-03-31 11:26:23 -03:00
core.c Merge branch 'pnp' into release 2011-01-12 04:59:44 -05:00
driver.c PNP / ACPI: Use DEVICE_ACPI_HANDLE() for device ACPI handle access 2011-01-11 15:20:40 -05:00
interface.c PNP: Simplify setting of resources 2013-01-03 13:10:52 +01:00
manager.c PNP: Handle IORESOURCE_BITS in resource allocation 2013-01-03 13:10:53 +01:00
quirks.c PNP: work around Dell 1536/1546 BIOS MMCONFIG bug that breaks USB 2012-01-06 12:11:20 -08:00
resource.c ACPI: Move device resources interpretation code from PNP to ACPI core 2012-11-15 00:30:01 +01:00
support.c
system.c