From: Thorsten Blum Date: Sun, 9 Feb 2025 22:08:35 +0000 (+0100) Subject: ACPI: power: Use str_on_off() helper function X-Git-Tag: io_uring-6.15-20250403~114^2~1^2 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=7d36289aa7447283883df4dc3ea816dbe06e1c8b;p=linux-block.git ACPI: power: Use str_on_off() helper function Use the str_on_off() helper function instead of hard-coded strings. Signed-off-by: Thorsten Blum Link: https://patch.msgid.link/20250209220835.78434-2-thorsten.blum@linux.dev [ rjw: Changelog edits ] Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/acpi/power.c b/drivers/acpi/power.c index 25174c24d3d7..b7243d7563b1 100644 --- a/drivers/acpi/power.c +++ b/drivers/acpi/power.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -197,7 +198,7 @@ static int __get_state(acpi_handle handle, u8 *state) cur_state = sta & ACPI_POWER_RESOURCE_STATE_ON; acpi_handle_debug(handle, "Power resource is %s\n", - cur_state ? "on" : "off"); + str_on_off(cur_state)); *state = cur_state; return 0; @@ -240,7 +241,7 @@ static int acpi_power_get_list_state(struct list_head *list, u8 *state) break; } - pr_debug("Power resource list is %s\n", cur_state ? "on" : "off"); + pr_debug("Power resource list is %s\n", str_on_off(cur_state)); *state = cur_state; return 0;