Skip to content

Commit

Permalink
HID: fix whitespace damage
Browse files Browse the repository at this point in the history
Fixes some trivial whitespace damage in hid-input.c

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
  • Loading branch information
Jiri Kosina committed Oct 14, 2007
1 parent b27c959 commit 77b2966
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions drivers/hid/hid-input.c
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ static int hidinput_getkeycode(struct input_dev *dev, int scancode,
{
struct hid_device *hid = dev->private;
struct hid_usage *usage;

usage = hidinput_find_key(hid, scancode, 0);
if (usage) {
*keycode = usage->code;
Expand All @@ -314,26 +314,26 @@ static int hidinput_setkeycode(struct input_dev *dev, int scancode,
struct hid_device *hid = dev->private;
struct hid_usage *usage;
int old_keycode;

if (keycode < 0 || keycode > KEY_MAX)
return -EINVAL;

usage = hidinput_find_key(hid, scancode, 0);
if (usage) {
old_keycode = usage->code;
usage->code = keycode;

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", 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);

return 0;
}

return -EINVAL;
}

Expand Down

0 comments on commit 77b2966

Please sign in to comment.