Skip to content

Commit de4b8d2

Browse files
jic23dtor
authored andcommitted
Input: pxspad - fix unused data warning when force feedback not enabled
The functions using this data were protected with #ifdef CONFIG_JOYSTICK_PSXPAD_SPI_FF. Do the same for the data used only in those functions. Signed-off-by: Jonathan Cameron <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent 1c89ef6 commit de4b8d2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/input/joystick/psxpad-spi.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ static const u8 PSX_CMD_POLL[] = {
4444
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4545
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
4646
};
47+
48+
#ifdef CONFIG_JOYSTICK_PSXPAD_SPI_FF
4749
/* 0x01, 0x43, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 */
4850
static const u8 PSX_CMD_ENTER_CFG[] = {
4951
0x80, 0xC2, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00
@@ -56,6 +58,7 @@ static const u8 PSX_CMD_EXIT_CFG[] = {
5658
static const u8 PSX_CMD_ENABLE_MOTOR[] = {
5759
0x80, 0xB2, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0xFF
5860
};
61+
#endif /* CONFIG_JOYSTICK_PSXPAD_SPI_FF */
5962

6063
struct psxpad {
6164
struct spi_device *spi;

0 commit comments

Comments
 (0)