From: matthieu castet <castet.matthieu@free.fr>
Date: Fri, 6 Jan 2006 06:31:00 +0000 (-0500)
Subject: [PNPACPI] Ignore devices that have no resources
X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=07b0120d53a3e7cbc88458a64a4d668fc416100f;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git

[PNPACPI] Ignore devices that have no resources

Ignore devices that don't have a _CRS method.
They are useless for the PNP layer as they don't provide any resources.

Cc: Adam Belay <ambx1@neo.rr.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
---

diff --git a/drivers/pnp/pnpacpi/core.c b/drivers/pnp/pnpacpi/core.c
index 816479ad217b..e77d1feb759e 100644
--- a/drivers/pnp/pnpacpi/core.c
+++ b/drivers/pnp/pnpacpi/core.c
@@ -131,7 +131,8 @@ static int __init pnpacpi_add_device(struct acpi_device *device)
 	struct pnp_id *dev_id;
 	struct pnp_dev *dev;
 
-	if (!ispnpidacpi(acpi_device_hid(device)) ||
+	status = acpi_get_handle(device->handle, "_CRS", &temp);
+	if (ACPI_FAILURE(status) || !ispnpidacpi(acpi_device_hid(device)) ||
 		is_exclusive_device(device))
 		return 0;