diff options
author | Daniel J. Ogorchock <djogorchock@gmail.com> | 2022-05-28 17:23:31 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2022-06-08 11:49:06 +0200 |
commit | 92cdfba40155aab313d307eecbaef331b447fe54 (patch) | |
tree | 17de542ac9245b98be0db090c0b2596b28e595b1 /drivers/hid/hid-nintendo.c | |
parent | e51d8d3ea3d773334d2c047c8d1623dba66f592a (diff) | |
download | lwn-92cdfba40155aab313d307eecbaef331b447fe54.tar.gz lwn-92cdfba40155aab313d307eecbaef331b447fe54.zip |
HID: nintendo: fix unused const warning
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>
Diffstat (limited to 'drivers/hid/hid-nintendo.c')
-rw-r--r-- | drivers/hid/hid-nintendo.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/hid/hid-nintendo.c b/drivers/hid/hid-nintendo.c index 2204de889739..dcd0f16de7b5 100644 --- a/drivers/hid/hid-nintendo.c +++ b/drivers/hid/hid-nintendo.c @@ -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, |