Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 3 Dec 2010 01:40:04 +0000 (17:40 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 3 Dec 2010 01:40:04 +0000 (17:40 -0800)
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
  HID: length resolution should be reported units/mm
  HID: add support for F430 Force Feedback Wheel
  HID: egalax: Use kzalloc
  HID: Remove KERN_DEBUG from dbg_hid use

Manually fixed trivial conflict in drivers/hid/hid-input.c (due to
removal of KERN_DEBUG from dbg_hid use clashing with new keycode
interface switch)

1  2 
drivers/hid/hid-core.c
drivers/hid/hid-input.c

Simple merge
@@@ -165,24 -127,21 +165,24 @@@ static int hidinput_setkeycode(struct i
  {
        struct hid_device *hid = input_get_drvdata(dev);
        struct hid_usage *usage;
 -      int old_keycode;
  
 -      usage = hidinput_find_key(hid, scancode, 0);
 +      usage = hidinput_locate_usage(hid, ke, NULL);
        if (usage) {
 -              old_keycode = usage->code;
 -              usage->code = keycode;
 +              *old_keycode = usage->type == EV_KEY ?
 +                              usage->code : KEY_RESERVED;
 +              usage->code = ke->keycode;
  
 -              clear_bit(old_keycode, dev->keybit);
 +              clear_bit(*old_keycode, dev->keybit);
                set_bit(usage->code, dev->keybit);
-               dbg_hid(KERN_DEBUG "Assigned keycode %d to HID usage code %x\n",
+               dbg_hid("Assigned keycode %d to HID usage code %x\n",
 -                              keycode, scancode);
 -              /* Set the keybit for the old keycode if the old keycode is used
 -               * by another key */
 -              if (hidinput_find_key (hid, 0, old_keycode))
 -                      set_bit(old_keycode, dev->keybit);
 +                      usage->code, usage->hid);
 +
 +              /*
 +               * Set the keybit for the old keycode if the old keycode is used
 +               * by another key
 +               */
 +              if (hidinput_find_key(hid, match_keycode, *old_keycode, NULL))
 +                      set_bit(*old_keycode, dev->keybit);
  
                return 0;
        }