summaryrefslogtreecommitdiff
path: root/drivers/input
diff options
context:
space:
mode:
authorJonathan Cameron <Jonathan.Cameron@huawei.com>2022-12-04 21:08:41 +0300
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2022-12-08 00:29:05 +0300
commitde4b8d201666b332034f8117b0995a43534b57d3 (patch)
tree27cbf1811004e0ccdd71a9c2752e10ecec491aed /drivers/input
parent1c89ef672a161bfdb5c72f35b80940ea56c9f935 (diff)
downloadlinux-de4b8d201666b332034f8117b0995a43534b57d3.tar.xz
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 <Jonathan.Cameron@huawei.com> Link: https://lore.kernel.org/r/20221204180841.2211588-33-jic23@kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/joystick/psxpad-spi.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/input/joystick/psxpad-spi.c b/drivers/input/joystick/psxpad-spi.c
index 2c395af13d42..de734a927b4d 100644
--- a/drivers/input/joystick/psxpad-spi.c
+++ b/drivers/input/joystick/psxpad-spi.c
@@ -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
};
+
+#ifdef CONFIG_JOYSTICK_PSXPAD_SPI_FF
/* 0x01, 0x43, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 */
static const u8 PSX_CMD_ENTER_CFG[] = {
0x80, 0xC2, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00
@@ -56,6 +58,7 @@ static const u8 PSX_CMD_EXIT_CFG[] = {
static const u8 PSX_CMD_ENABLE_MOTOR[] = {
0x80, 0xB2, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0xFF
};
+#endif /* CONFIG_JOYSTICK_PSXPAD_SPI_FF */
struct psxpad {
struct spi_device *spi;