ACPICA: use new ACPI headers.
[sfrench/cifs-2.6.git] / drivers / acpi / scan.c
index 698a1540e3033ce1960d4c72a45f3a8177397d94..0de4586646429c5e7c3eae2cb5efa8ab83aca38c 100644 (file)
@@ -984,12 +984,11 @@ acpi_add_single_object(struct acpi_device **child,
        if (!child)
                return -EINVAL;
 
-       device = kmalloc(sizeof(struct acpi_device), GFP_KERNEL);
+       device = kzalloc(sizeof(struct acpi_device), GFP_KERNEL);
        if (!device) {
                printk(KERN_ERR PREFIX "Memory allocation error\n");
                return -ENOMEM;
        }
-       memset(device, 0, sizeof(struct acpi_device));
 
        device->handle = handle;
        device->parent = parent;
@@ -1334,7 +1333,7 @@ static int acpi_bus_scan_fixed(struct acpi_device *root)
        /*
         * Enumerate all fixed-feature devices.
         */
-       if (acpi_fadt.pwr_button == 0) {
+       if ((acpi_gbl_FADT.flags & ACPI_FADT_POWER_BUTTON) == 0) {
                result = acpi_add_single_object(&device, acpi_root,
                                                NULL,
                                                ACPI_BUS_TYPE_POWER_BUTTON);
@@ -1342,7 +1341,7 @@ static int acpi_bus_scan_fixed(struct acpi_device *root)
                        result = acpi_start_single_object(device);
        }
 
-       if (acpi_fadt.sleep_button == 0) {
+       if ((acpi_gbl_FADT.flags & ACPI_FADT_SLEEP_BUTTON) == 0) {
                result = acpi_add_single_object(&device, acpi_root,
                                                NULL,
                                                ACPI_BUS_TYPE_SLEEP_BUTTON);