Skip to content

Commit c7ad781

Browse files
LawstorantJiri Kosina
authored andcommitted
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>
1 parent 8de2cef commit c7ad781

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/hid/usbhid/hid-pidff.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
#define PID_DEVICE_CONTROL 6
3434
#define PID_CREATE_NEW_EFFECT 7
3535

36-
#define PID_REQUIRED_REPORTS 7
36+
#define PID_REQUIRED_REPORTS 8
3737

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

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

0 commit comments

Comments
 (0)