]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/acpi/container.c
Revert "Call init_workqueues before pre smp initcalls."
[linux-2.6-omap-h63xx.git] / drivers / acpi / container.c
index 0930d9413dfa31768e889e7150e9dd55a0691670..134818b265a9fae8ff5aec7af3e443d4cc6d7c59 100644 (file)
@@ -49,15 +49,21 @@ MODULE_AUTHOR("Anil S Keshavamurthy");
 MODULE_DESCRIPTION("ACPI container driver");
 MODULE_LICENSE("GPL");
 
-#define ACPI_STA_PRESENT               (0x00000001)
-
 static int acpi_container_add(struct acpi_device *device);
 static int acpi_container_remove(struct acpi_device *device, int type);
 
+static const struct acpi_device_id container_device_ids[] = {
+       {"ACPI0004", 0},
+       {"PNP0A05", 0},
+       {"PNP0A06", 0},
+       {"", 0},
+};
+MODULE_DEVICE_TABLE(acpi, container_device_ids);
+
 static struct acpi_driver acpi_container_driver = {
        .name = "container",
        .class = ACPI_CONTAINER_CLASS,
-       .ids = "ACPI0004,PNP0A05,PNP0A06",
+       .ids = container_device_ids,
        .ops = {
                .add = acpi_container_add,
                .remove = acpi_container_remove,
@@ -70,18 +76,18 @@ static int is_device_present(acpi_handle handle)
 {
        acpi_handle temp;
        acpi_status status;
-       unsigned long sta;
+       unsigned long long sta;
 
 
        status = acpi_get_handle(handle, "_STA", &temp);
        if (ACPI_FAILURE(status))
-               return 1;       /* _STA not found, assmue device present */
+               return 1;       /* _STA not found, assume device present */
 
        status = acpi_evaluate_integer(handle, "_STA", NULL, &sta);
        if (ACPI_FAILURE(status))
                return 0;       /* Firmware error */
 
-       return ((sta & ACPI_STA_PRESENT) == ACPI_STA_PRESENT);
+       return ((sta & ACPI_STA_DEVICE_PRESENT) == ACPI_STA_DEVICE_PRESENT);
 }
 
 /*******************************************************************/
@@ -102,7 +108,7 @@ static int acpi_container_add(struct acpi_device *device)
        container->handle = device->handle;
        strcpy(acpi_device_name(device), ACPI_CONTAINER_DEVICE_NAME);
        strcpy(acpi_device_class(device), ACPI_CONTAINER_CLASS);
-       acpi_driver_data(device) = container;
+       device->driver_data = container;
 
        ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device <%s> bid <%s>\n",
                          acpi_device_name(device), acpi_device_bid(device)));