ACPI: Clean redundant codes in scan.c
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>
This commit is contained in:
@@ -880,7 +880,6 @@ static int acpi_bus_get_power_flags(struct acpi_device *device)
|
|||||||
int j;
|
int j;
|
||||||
|
|
||||||
device->power.flags.power_resources = 1;
|
device->power.flags.power_resources = 1;
|
||||||
ps->flags.valid = 1;
|
|
||||||
for (j = 0; j < ps->resources.count; j++)
|
for (j = 0; j < ps->resources.count; j++)
|
||||||
acpi_bus_add_power_resource(ps->resources.handles[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 */
|
/* Evaluate "_PSx" to see if we can do explicit sets */
|
||||||
object_name[2] = 'S';
|
object_name[2] = 'S';
|
||||||
status = acpi_get_handle(device->handle, object_name, &handle);
|
status = acpi_get_handle(device->handle, object_name, &handle);
|
||||||
if (ACPI_SUCCESS(status)) {
|
if (ACPI_SUCCESS(status))
|
||||||
ps->flags.explicit_set = 1;
|
ps->flags.explicit_set = 1;
|
||||||
ps->flags.valid = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* State is valid if we have some power control */
|
/* State is valid if we have some power control */
|
||||||
if (ps->resources.count || ps->flags.explicit_set)
|
if (ps->resources.count || ps->flags.explicit_set)
|
||||||
|
Reference in New Issue
Block a user