From: Thorsten Blum Date: Tue, 14 Jan 2025 21:41:06 +0000 (-0800) Subject: Input: joystick - use str_off_on() helper in sw_connect() X-Git-Tag: v6.14-rc1~144^2^2~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d3561c4098de9666b87630ad3f090b41e67cdd62;p=thirdparty%2Fkernel%2Flinux.git Input: joystick - use str_off_on() helper in sw_connect() Remove hard-coded strings by using the str_off_on() helper. Signed-off-by: Thorsten Blum Link: https://lore.kernel.org/r/20241202154603.1193-2-thorsten.blum@linux.dev Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/joystick/sidewinder.c b/drivers/input/joystick/sidewinder.c index f6e92db4d7896..3a5873e5fcb30 100644 --- a/drivers/input/joystick/sidewinder.c +++ b/drivers/input/joystick/sidewinder.c @@ -14,6 +14,7 @@ #include #include #include +#include #define DRIVER_DESC "Microsoft SideWinder joystick family driver" @@ -677,7 +678,7 @@ static int sw_connect(struct gameport *gameport, struct gameport_driver *drv) case 48: /* Ambiguous */ if (j == 14) { /* ID length 14*3 -> FFP */ sw->type = SW_ID_FFP; - sprintf(comment, " [AC %s]", sw_get_bits(idbuf,38,1,3) ? "off" : "on"); + sprintf(comment, " [AC %s]", str_off_on(sw_get_bits(idbuf,38,1,3))); } else sw->type = SW_ID_PP; break;