Skip to content

Commit 54f27dc

Browse files
JoseExpositoJiri Kosina
authored andcommitted
HID: sony: Fix unused function warning
Compiling this driver without setting "CONFIG_SONY_FF" generates the following warning: drivers/hid/hid-sony.c:2358:20: warning: unused function 'sony_send_output_report' [-Wunused-function] static inline void sony_send_output_report(struct sony_sc *sc) ^ 1 warning generated. Add the missing preprocessor check to fix it. Signed-off-by: José Expósito <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 3d57f36 commit 54f27dc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/hid/hid-sony.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2355,11 +2355,13 @@ static void motion_send_output_report(struct sony_sc *sc)
23552355
hid_hw_output_report(hdev, (u8 *)report, MOTION_REPORT_0x02_SIZE);
23562356
}
23572357

2358+
#ifdef CONFIG_SONY_FF
23582359
static inline void sony_send_output_report(struct sony_sc *sc)
23592360
{
23602361
if (sc->send_output_report)
23612362
sc->send_output_report(sc);
23622363
}
2364+
#endif
23632365

23642366
static void sony_state_worker(struct work_struct *work)
23652367
{

0 commit comments

Comments
 (0)