Skip to content

Commit

Permalink
HID: sony: Fix unused function warning
Browse files Browse the repository at this point in the history
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 <jose.exposito89@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
  • Loading branch information
José Expósito authored and Jiri Kosina committed Dec 20, 2022
1 parent 3d57f36 commit 54f27dc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/hid/hid-sony.c
Original file line number Diff line number Diff line change
Expand Up @@ -2355,11 +2355,13 @@ static void motion_send_output_report(struct sony_sc *sc)
hid_hw_output_report(hdev, (u8 *)report, MOTION_REPORT_0x02_SIZE);
}

#ifdef CONFIG_SONY_FF
static inline void sony_send_output_report(struct sony_sc *sc)
{
if (sc->send_output_report)
sc->send_output_report(sc);
}
#endif

static void sony_state_worker(struct work_struct *work)
{
Expand Down

0 comments on commit 54f27dc

Please sign in to comment.