Commit de4b8d20 authored by Jonathan Cameron's avatar Jonathan Cameron Committed by Dmitry Torokhov

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: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20221204180841.2211588-33-jic23@kernel.orgSigned-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 1c89ef67
...@@ -44,6 +44,8 @@ static const u8 PSX_CMD_POLL[] = { ...@@ -44,6 +44,8 @@ static const u8 PSX_CMD_POLL[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
}; };
#ifdef CONFIG_JOYSTICK_PSXPAD_SPI_FF
/* 0x01, 0x43, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 */ /* 0x01, 0x43, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 */
static const u8 PSX_CMD_ENTER_CFG[] = { static const u8 PSX_CMD_ENTER_CFG[] = {
0x80, 0xC2, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00 0x80, 0xC2, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00
...@@ -56,6 +58,7 @@ static const u8 PSX_CMD_EXIT_CFG[] = { ...@@ -56,6 +58,7 @@ static const u8 PSX_CMD_EXIT_CFG[] = {
static const u8 PSX_CMD_ENABLE_MOTOR[] = { static const u8 PSX_CMD_ENABLE_MOTOR[] = {
0x80, 0xB2, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0xFF 0x80, 0xB2, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0xFF
}; };
#endif /* CONFIG_JOYSTICK_PSXPAD_SPI_FF */
struct psxpad { struct psxpad {
struct spi_device *spi; struct spi_device *spi;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment