ACPI / PM: Avoid infinite recurrence while registering power resources
[linux-2.6-block.git] / drivers / acpi / scan.c
index b136c9c1e531954dc27cc4bed422e1618e7681ee..449c556274c052cf4c9fd221c577b7735bcdca0f 100644 (file)
@@ -943,6 +943,10 @@ static int acpi_bus_get_flags(struct acpi_device *device)
        if (ACPI_SUCCESS(status))
                device->flags.lockable = 1;
 
+       /* Power resources cannot be power manageable. */
+       if (device->device_type == ACPI_BUS_TYPE_POWER)
+               return 0;
+
        /* Presence of _PS0|_PR0 indicates 'power manageable' */
        status = acpi_get_handle(device->handle, "_PS0", &temp);
        if (ACPI_FAILURE(status))