Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Thorsten Blum and committed by
Greg Kroah-Hartman
74826b3f 17f18e04

+6 -5
+6 -5
drivers/char/sonypi.c
··· 37 37 #include <linux/kfifo.h> 38 38 #include <linux/platform_device.h> 39 39 #include <linux/gfp.h> 40 + #include <linux/string_choices.h> 40 41 41 42 #include <linux/uaccess.h> 42 43 #include <asm/io.h> ··· 1269 1268 "compat = %s, mask = 0x%08lx, useinput = %s, acpi = %s\n", 1270 1269 sonypi_device.model, 1271 1270 verbose, 1272 - fnkeyinit ? "on" : "off", 1273 - camera ? "on" : "off", 1274 - compat ? "on" : "off", 1271 + str_on_off(fnkeyinit), 1272 + str_on_off(camera), 1273 + str_on_off(compat), 1275 1274 mask, 1276 - useinput ? "on" : "off", 1277 - SONYPI_ACPI_ACTIVE ? "on" : "off"); 1275 + str_on_off(useinput), 1276 + str_on_off(SONYPI_ACPI_ACTIVE)); 1278 1277 printk(KERN_INFO "sonypi: enabled at irq=%d, port1=0x%x, port2=0x%x\n", 1279 1278 sonypi_device.irq, 1280 1279 sonypi_device.ioport1, sonypi_device.ioport2);