Skip to content

Commit

Permalink
ACPI: Clean redundant codes in scan.c
Browse files Browse the repository at this point in the history
Clean the redundant codes of apci_bus_get_power_flags().

Signed-off-by: Alex He <alex.he@amd.com>
Signed-off-by: Len Brown <len.brown@intel.com>
  • Loading branch information
Alex He authored and lenb committed Mar 30, 2012
1 parent 9505626 commit 3723997
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/acpi/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -880,18 +880,15 @@ 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]);
}

/* 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)
Expand Down

0 comments on commit 3723997

Please sign in to comment.