Commit c7ad7812 authored by Tomasz Pakuła's avatar Tomasz Pakuła Committed by Jiri Kosina
Browse files

HID: pidff: Treat PID_REQUIRED_REPORTS as count, not max



It's naming suggests it's a count of the records required by the USB PID
standard and this driver.

Signed-off-by: default avatarTomasz Pakuła <tomasz.pakula.oficjalny@gmail.com>
Reviewed-by: default avatarOleg Makarenko <oleg@makarenk.ooo>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.com>
parent 8de2cef6
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@
#define PID_DEVICE_CONTROL	6
#define PID_CREATE_NEW_EFFECT	7

#define PID_REQUIRED_REPORTS	7
#define PID_REQUIRED_REPORTS	8

#define PID_SET_ENVELOPE	8
#define PID_SET_CONDITION	9
@@ -1056,7 +1056,7 @@ static int pidff_reports_ok(struct pidff_device *pidff)
{
	int i;

	for (i = 0; i <= PID_REQUIRED_REPORTS; i++) {
	for (i = 0; i < PID_REQUIRED_REPORTS; i++) {
		if (!pidff->reports[i]) {
			hid_dbg(pidff->hid, "%d missing\n", i);
			return 0;