]> git.baikalelectronics.ru Git - kernel.git/commitdiff
HID: nintendo: fix unused const warning
authorDaniel J. Ogorchock <djogorchock@gmail.com>
Sat, 28 May 2022 21:23:31 +0000 (17:23 -0400)
committerJiri Kosina <jkosina@suse.cz>
Wed, 8 Jun 2022 09:49:06 +0000 (11:49 +0200)
JC_RUMBLE_ZERO_AMP_PKT_CNT is only used when force feedback support in
the driver is enabled. Place the declaration in the CONFIG_NINTENDO_FF
ifdef to avoid a warning when compiling without rumble support.

Signed-off-by: Daniel J. Ogorchock <djogorchock@gmail.com>
Reviewed-by: Silvan Jegen <s.jegen@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-nintendo.c

index 2204de889739f526be3fa7fa585f3b11b11b8b06..dcd0f16de7b514b71a0c3c96a73685c9008bece9 100644 (file)
@@ -292,6 +292,7 @@ static const struct joycon_rumble_amp_data joycon_rumble_amplitudes[] = {
 };
 static const u16 JC_RUMBLE_DFLT_LOW_FREQ = 160;
 static const u16 JC_RUMBLE_DFLT_HIGH_FREQ = 320;
+static const unsigned short JC_RUMBLE_ZERO_AMP_PKT_CNT = 5;
 #endif /* IS_ENABLED(CONFIG_NINTENDO_FF) */
 static const u16 JC_RUMBLE_PERIOD_MS = 50;
 
@@ -402,8 +403,6 @@ struct joycon_input_report {
 #define JC_RUMBLE_DATA_SIZE    8
 #define JC_RUMBLE_QUEUE_SIZE   8
 
-static const unsigned short JC_RUMBLE_ZERO_AMP_PKT_CNT = 5;
-
 static const char * const joycon_player_led_names[] = {
        LED_FUNCTION_PLAYER1,
        LED_FUNCTION_PLAYER2,