[PATCH] PNPACPI : don't use device not present

From: matthieu castet
Date: Fri Feb 04 2005 - 12:34:59 EST


Hi,
this patch avoid the pnpacpi layer reconized not present device.

There is still issue [1] with the ACPI code that need to fix in order everything work correctly...

Matthieu CASTET


[1] http://bugzilla.kernel.org/show_bug.cgi?id=3358 --- linux-2.6.9/drivers/pnp/pnpacpi/core.c 2004-11-22 20:35:58.000000000 +0100
+++ linux-2.6.9/drivers/pnp/pnpacpi/core.c 2004-11-26 14:46:54.000000000 +0100
@@ -124,6 +124,10 @@
struct pnp_dev *dev;

pnp_dbg("ACPI device : hid %s", acpi_device_hid(device));
+
+ if(!device->status.present)
+ return -ENODEV;
+
dev = pnpacpi_kmalloc(sizeof(struct pnp_dev), GFP_KERNEL);
if (!dev) {
pnp_err("Out of memory");