Skip to content

Commit 74826b3

Browse files
tobluxgregkh
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 17f18e0 commit 74826b3

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

drivers/char/sonypi.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
#include <linux/kfifo.h>
3838
#include <linux/platform_device.h>
3939
#include <linux/gfp.h>
40+
#include <linux/string_choices.h>
4041

4142
#include <linux/uaccess.h>
4243
#include <asm/io.h>
@@ -1268,12 +1269,12 @@ static void sonypi_display_info(void)
12681269
"compat = %s, mask = 0x%08lx, useinput = %s, acpi = %s\n",
12691270
sonypi_device.model,
12701271
verbose,
1271-
fnkeyinit ? "on" : "off",
1272-
camera ? "on" : "off",
1273-
compat ? "on" : "off",
1272+
str_on_off(fnkeyinit),
1273+
str_on_off(camera),
1274+
str_on_off(compat),
12741275
mask,
1275-
useinput ? "on" : "off",
1276-
SONYPI_ACPI_ACTIVE ? "on" : "off");
1276+
str_on_off(useinput),
1277+
str_on_off(SONYPI_ACPI_ACTIVE));
12771278
printk(KERN_INFO "sonypi: enabled at irq=%d, port1=0x%x, port2=0x%x\n",
12781279
sonypi_device.irq,
12791280
sonypi_device.ioport1, sonypi_device.ioport2);

0 commit comments

Comments
 (0)