]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/pnp/pnpacpi/core.c
ACPI / PNP: use device ID list for PNPACPI device enumeration
[karo-tx-linux.git] / drivers / pnp / pnpacpi / core.c
index c31aa07b3ba55541ff434adf45aed76adb0adee3..b81448b2c75da0c8c5d1803f3af64053f834e040 100644 (file)
 
 static int num;
 
-/* We need only to blacklist devices that have already an acpi driver that
- * can't use pnp layer. We don't need to blacklist device that are directly
- * used by the kernel (PCI root, ...), as it is harmless and there were
- * already present in pnpbios. But there is an exception for devices that
- * have irqs (PIC, Timer) because we call acpi_register_gsi.
- * Finally, only devices that have a CRS method need to be in this list.
- */
-static struct acpi_device_id excluded_id_list[] __initdata = {
-       {"PNP0C09", 0},         /* EC */
-       {"PNP0C0F", 0},         /* Link device */
-       {"PNP0000", 0},         /* PIC */
-       {"PNP0100", 0},         /* Timer */
-       {"", 0},
-};
-
-static inline int __init is_exclusive_device(struct acpi_device *dev)
-{
-       return (!acpi_match_device_ids(dev, excluded_id_list));
-}
-
 /*
  * Compatible Device IDs
  */
@@ -266,7 +246,7 @@ static int __init pnpacpi_add_device(struct acpi_device *device)
        if (!pnpid)
                return 0;
 
-       if (is_exclusive_device(device) || !device->status.present)
+       if (!device->status.present)
                return 0;
 
        dev = pnp_alloc_dev(&pnpacpi_protocol, num, pnpid);
@@ -326,10 +306,10 @@ static acpi_status __init pnpacpi_add_device_handler(acpi_handle handle,
 {
        struct acpi_device *device;
 
-       if (!acpi_bus_get_device(handle, &device))
-               pnpacpi_add_device(device);
-       else
+       if (acpi_bus_get_device(handle, &device))
                return AE_CTRL_DEPTH;
+       if (acpi_is_pnp_device(device))
+               pnpacpi_add_device(device);
        return AE_OK;
 }