diff options
| author | Tomasz Pakuła <tomasz.pakula.oficjalny@gmail.com> | 2025-08-13 22:09:53 +0200 |
|---|---|---|
| committer | Jiri Kosina <jkosina@suse.com> | 2025-08-15 15:58:02 +0200 |
| commit | c7ad7812fb8c9319a5148b3c8f14b0b0b3d7e015 (patch) | |
| tree | a6eefe83b7beddf03d30e56bd4462b891077581f | |
| parent | 8de2cef6d0de8cdddee8d653a18791525af26fad (diff) | |
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: Tomasz Pakuła <tomasz.pakula.oficjalny@gmail.com>
Reviewed-by: Oleg Makarenko <oleg@makarenk.ooo>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
| -rw-r--r-- | drivers/hid/usbhid/hid-pidff.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hid/usbhid/hid-pidff.c b/drivers/hid/usbhid/hid-pidff.c index 2f9fbe4c52d7..cff79e76c211 100644 --- a/drivers/hid/usbhid/hid-pidff.c +++ b/drivers/hid/usbhid/hid-pidff.c @@ -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; |
