From e88c9c603b2ad0cd0fbe90afedba3f1becbbeb79 Mon Sep 17 00:00:00 2001 From: "Rafael J. Wysocki" Date: Thu, 17 Jan 2013 14:11:07 +0100 Subject: ACPI: Take power resource initialization errors into account Some ACPI power resource initialization errors, like memory allocation errors, are not taken into account appropriately in some cases, which may lead to a device having an incomplete list of power resources that one of its power states depends on, for one example. Rework the power resource initialization and namespace scanning code so that power resource initialization errors are treated more seriously. Signed-off-by: Rafael J. Wysocki --- drivers/acpi/internal.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'drivers/acpi/internal.h') diff --git a/drivers/acpi/internal.h b/drivers/acpi/internal.h index c35435e3d760..8a6c67c9da42 100644 --- a/drivers/acpi/internal.h +++ b/drivers/acpi/internal.h @@ -51,10 +51,9 @@ void acpi_free_ids(struct acpi_device *device); -------------------------------------------------------------------------- */ int acpi_power_init(void); void acpi_power_resources_list_free(struct list_head *list); -acpi_status acpi_extract_power_resources(union acpi_object *package, - unsigned int start, - struct list_head *list); -void acpi_add_power_resource(acpi_handle handle); +int acpi_extract_power_resources(union acpi_object *package, unsigned int start, + struct list_head *list); +int acpi_add_power_resource(acpi_handle handle); void acpi_power_add_remove_device(struct acpi_device *adev, bool add); int acpi_device_sleep_wake(struct acpi_device *dev, int enable, int sleep_state, int dev_state); -- cgit v1.2.3