Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jikos/hid
authorLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 30 Apr 2007 15:58:21 +0000 (08:58 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 30 Apr 2007 15:58:21 +0000 (08:58 -0700)
* 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jikos/hid: (21 commits)
  USB HID: don't warn on idVendor == 0
  USB HID: add 'quirks' module parameter
  USB HID: add support for dynamically-created quirks
  USB HID: clarify static quirk handling as squirks
  USB HID: encapsulate quirk handling into hid-quirks.c
  USB HID: EMS USBII device needs HID_QUIRK_MULTI_INPUT
  HID: update copyright and authorship macro
  HID: introduce proper zeroing of unused bits in output reports
  USB HID: add support for WiseGroup MP-8800 Quad Joypad
  USB HID: add FF support for Logitech Force 3D Pro Joystick
  USB HID: numlock quirk for dell W7658 keyboard
  USB HID: Logitech MX3000 keyboard needs report descriptor quirk
  USB HID: extend quirk for Logitech S510 keyboard
  USB HID: usbkbd/usbmouse - handle errors when registering devices
  USB HID: add QUIRK_HIDDEV for Belkin Flip KVM
  HID: enable dead keys on a belkin wireless keyboard
  USB HID: Thustmaster firestorm dual power v1 support
  USB HID: specify explicit size for hid_blacklist.quirks
  USB HID: fix retry & reset logic
  USB HID: consolidate vendor/product ids
  ...

1  2 
drivers/hid/hid-core.c
drivers/usb/Makefile

diff --combined drivers/hid/hid-core.c
@@@ -4,7 -4,7 +4,7 @@@
   *  Copyright (c) 1999 Andreas Gal
   *  Copyright (c) 2000-2005 Vojtech Pavlik <vojtech@suse.cz>
   *  Copyright (c) 2005 Michael Haboustak <mike-@cinci.rr.com> for Concept2, Inc
-  *  Copyright (c) 2006 Jiri Kosina
+  *  Copyright (c) 2006-2007 Jiri Kosina
   */
  
  /*
@@@ -37,7 -37,7 +37,7 @@@
   */
  
  #define DRIVER_VERSION "v2.6"
- #define DRIVER_AUTHOR "Andreas Gal, Vojtech Pavlik"
+ #define DRIVER_AUTHOR "Andreas Gal, Vojtech Pavlik, Jiri Kosina"
  #define DRIVER_DESC "HID core driver"
  #define DRIVER_LICENSE "GPL"
  
@@@ -872,8 -872,13 +872,13 @@@ static void hid_output_field(struct hid
        unsigned count = field->report_count;
        unsigned offset = field->report_offset;
        unsigned size = field->report_size;
+       unsigned bitsused = offset + count * size;
        unsigned n;
  
+       /* make sure the unused bits in the last byte are zeros */
+       if (count > 0 && size > 0 && (bitsused % 8) != 0)
+               data[(bitsused-1)/8] &= (1 << (bitsused % 8)) - 1;
        for (n = 0; n < count; n++) {
                if (field->logical_minimum < 0) /* signed values */
                        implement(data, offset + n * size, size, s32ton(field->value[n], size));
@@@ -969,7 -974,7 +974,7 @@@ int hid_input_report(struct hid_device 
  
        if (size < rsize) {
                dbg("report %d is too short, (%d < %d)", report->id, size, rsize);
 -              return -1;
 +              memset(data + size, 0, rsize - size);
        }
  
        if ((hid->claimed & HID_CLAIMED_HIDDEV) && hid->hiddev_report_event)
diff --combined drivers/usb/Makefile
@@@ -15,6 -15,7 +15,6 @@@ obj-$(CONFIG_USB_OHCI_HCD)    += host
  obj-$(CONFIG_USB_UHCI_HCD)    += host/
  obj-$(CONFIG_USB_SL811_HCD)   += host/
  obj-$(CONFIG_USB_U132_HCD)    += host/
 -obj-$(CONFIG_ETRAX_USB_HOST)  += host/
  obj-$(CONFIG_USB_OHCI_AT91)   += host/
  
  obj-$(CONFIG_USB_ACM)         += class/
@@@ -26,10 -27,7 +26,7 @@@ obj-$(CONFIG_USB)            += storage
  obj-$(CONFIG_USB_ACECAD)      += input/
  obj-$(CONFIG_USB_AIPTEK)      += input/
  obj-$(CONFIG_USB_ATI_REMOTE)  += input/
- obj-$(CONFIG_USB_HID)         += input/
- obj-$(CONFIG_USB_KBD)         += input/
  obj-$(CONFIG_USB_KBTAB)               += input/
- obj-$(CONFIG_USB_MOUSE)               += input/
  obj-$(CONFIG_USB_MTOUCH)      += input/
  obj-$(CONFIG_USB_POWERMATE)   += input/
  obj-$(CONFIG_USB_WACOM)               += input/