ChangeSet 1.739, 2002/10/11 11:02:13-07:00, acme@conectiva.com.br

[PATCH] hid-input: fix find_next_zero_bit usage

  It was swapping the parameters, using the bitfield size for the
  offset and the offset for the bitfield size. With this the mouse
  buttons in my wireless USB keyboard finally works 8) 2.4 has the
  same problem.


diff -Nru a/drivers/usb/hid-input.c b/drivers/usb/hid-input.c
--- a/drivers/usb/hid-input.c	Fri Oct 11 12:32:59 2002
+++ b/drivers/usb/hid-input.c	Fri Oct 11 12:32:59 2002
@@ -271,7 +271,7 @@
 	set_bit(usage->type, input->evbit);
 
 	while (usage->code <= max && test_and_set_bit(usage->code, bit)) {
-		usage->code = find_next_zero_bit(bit, max + 1, usage->code);
+		usage->code = find_next_zero_bit(bit, usage->code, max + 1);
 	}
 
 	if (usage->code > max) return;
