Skip to content

Commit a9b760b

Browse files
khfengrafaeljw
authored andcommitted
PM: ACPI: Output correct message on target power state
Transitioned power state logged at the end of setting ACPI power. However, D3cold won't be in the message because state can only be D3hot at most. Use target_state to corretly report when power state is D3cold. Cc: All applicable <[email protected]> Signed-off-by: Kai-Heng Feng <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 6a8b55e commit a9b760b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/acpi/device_pm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,13 +273,13 @@ int acpi_device_set_power(struct acpi_device *device, int state)
273273
end:
274274
if (result) {
275275
dev_warn(&device->dev, "Failed to change power state to %s\n",
276-
acpi_power_state_string(state));
276+
acpi_power_state_string(target_state));
277277
} else {
278278
device->power.state = target_state;
279279
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
280280
"Device [%s] transitioned to %s\n",
281281
device->pnp.bus_id,
282-
acpi_power_state_string(state)));
282+
acpi_power_state_string(target_state)));
283283
}
284284

285285
return result;

0 commit comments

Comments
 (0)