ACPI : Load device driver according to the status of acpi device
[linux-2.6.git] / drivers / pnp / pnpacpi / core.c
index c1b9ea3..98b9df7 100644 (file)
@@ -148,9 +148,13 @@ static int __init pnpacpi_add_device(struct acpi_device *device)
        acpi_status status;
        struct pnp_dev *dev;
 
+       /*
+        * If a PnPacpi device is not present , the device
+        * driver should not be loaded.
+        */
        status = acpi_get_handle(device->handle, "_CRS", &temp);
        if (ACPI_FAILURE(status) || !ispnpidacpi(acpi_device_hid(device)) ||
-           is_exclusive_device(device))
+           is_exclusive_device(device) || (!device->status.present))
                return 0;
 
        dev = pnp_alloc_dev(&pnpacpi_protocol, num, acpi_device_hid(device));