From: Alex He Date: Tue, 21 Feb 2012 08:58:10 +0000 (+0800) Subject: ACPI: Clean redundant codes in scan.c X-Git-Tag: MMI-PSA29.97-13-9~16866^2~3^7 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=37239978778806ecba54da60676abb46870acebb;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git ACPI: Clean redundant codes in scan.c Clean the redundant codes of apci_bus_get_power_flags(). Signed-off-by: Alex He Signed-off-by: Len Brown --- diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 8ab80bafe3f1..5d24a17aa854 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -880,7 +880,6 @@ static int acpi_bus_get_power_flags(struct acpi_device *device) int j; device->power.flags.power_resources = 1; - ps->flags.valid = 1; for (j = 0; j < ps->resources.count; j++) acpi_bus_add_power_resource(ps->resources.handles[j]); } @@ -888,10 +887,8 @@ static int acpi_bus_get_power_flags(struct acpi_device *device) /* Evaluate "_PSx" to see if we can do explicit sets */ object_name[2] = 'S'; status = acpi_get_handle(device->handle, object_name, &handle); - if (ACPI_SUCCESS(status)) { + if (ACPI_SUCCESS(status)) ps->flags.explicit_set = 1; - ps->flags.valid = 1; - } /* State is valid if we have some power control */ if (ps->resources.count || ps->flags.explicit_set)