summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/power.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/power.c')
-rw-r--r--drivers/acpi/power.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/acpi/power.c b/drivers/acpi/power.c
index 1600f753fafe..089a7c39348f 100644
--- a/drivers/acpi/power.c
+++ b/drivers/acpi/power.c
@@ -429,6 +429,20 @@ void acpi_power_add_remove_device(struct acpi_device *adev, bool add)
}
}
+int acpi_power_min_system_level(struct list_head *list)
+{
+ struct acpi_power_resource_entry *entry;
+ int system_level = 5;
+
+ list_for_each_entry(entry, list, node) {
+ struct acpi_power_resource *resource = entry->resource;
+
+ if (system_level > resource->system_level)
+ system_level = resource->system_level;
+ }
+ return system_level;
+}
+
/* --------------------------------------------------------------------------
Device Power Management
-------------------------------------------------------------------------- */