aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorThorsten Blum <thorsten.blum@linux.dev>2025-02-10 13:31:03 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-02-20 15:25:09 +0100
commit74826b3fd7d2f131ee9baebe66189b0ff3c50a96 (patch)
tree34aba1ca7954a6568f3d21783c927eaf666fddb9
parentvirtio_console: Get rid of unneeded temporary variable (diff)
downloadwireguard-linux-74826b3fd7d2f131ee9baebe66189b0ff3c50a96.tar.xz
wireguard-linux-74826b3fd7d2f131ee9baebe66189b0ff3c50a96.zip
sonypi: Use str_on_off() helper in sonypi_display_info()
Remove hard-coded strings by using the str_on_off() helper function. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Link: https://lore.kernel.org/r/20250210123103.112938-2-thorsten.blum@linux.dev Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/char/sonypi.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/char/sonypi.c b/drivers/char/sonypi.c
index f887569fd3d0..677bb5ac950a 100644
--- a/drivers/char/sonypi.c
+++ b/drivers/char/sonypi.c
@@ -37,6 +37,7 @@
#include <linux/kfifo.h>
#include <linux/platform_device.h>
#include <linux/gfp.h>
+#include <linux/string_choices.h>
#include <linux/uaccess.h>
#include <asm/io.h>
@@ -1268,12 +1269,12 @@ static void sonypi_display_info(void)
"compat = %s, mask = 0x%08lx, useinput = %s, acpi = %s\n",
sonypi_device.model,
verbose,
- fnkeyinit ? "on" : "off",
- camera ? "on" : "off",
- compat ? "on" : "off",
+ str_on_off(fnkeyinit),
+ str_on_off(camera),
+ str_on_off(compat),
mask,
- useinput ? "on" : "off",
- SONYPI_ACPI_ACTIVE ? "on" : "off");
+ str_on_off(useinput),
+ str_on_off(SONYPI_ACPI_ACTIVE));
printk(KERN_INFO "sonypi: enabled at irq=%d, port1=0x%x, port2=0x%x\n",
sonypi_device.irq,
sonypi_device.ioport1, sonypi_device.ioport2);