diff options
Diffstat (limited to 'drivers/hid/hid-input.c')
-rw-r--r-- | drivers/hid/hid-input.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index 00f326012a31..de8dbec6aae5 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c | |||
@@ -299,7 +299,7 @@ static int hidinput_getkeycode(struct input_dev *dev, int scancode, | |||
299 | { | 299 | { |
300 | struct hid_device *hid = dev->private; | 300 | struct hid_device *hid = dev->private; |
301 | struct hid_usage *usage; | 301 | struct hid_usage *usage; |
302 | 302 | ||
303 | usage = hidinput_find_key(hid, scancode, 0); | 303 | usage = hidinput_find_key(hid, scancode, 0); |
304 | if (usage) { | 304 | if (usage) { |
305 | *keycode = usage->code; | 305 | *keycode = usage->code; |
@@ -314,15 +314,15 @@ static int hidinput_setkeycode(struct input_dev *dev, int scancode, | |||
314 | struct hid_device *hid = dev->private; | 314 | struct hid_device *hid = dev->private; |
315 | struct hid_usage *usage; | 315 | struct hid_usage *usage; |
316 | int old_keycode; | 316 | int old_keycode; |
317 | 317 | ||
318 | if (keycode < 0 || keycode > KEY_MAX) | 318 | if (keycode < 0 || keycode > KEY_MAX) |
319 | return -EINVAL; | 319 | return -EINVAL; |
320 | 320 | ||
321 | usage = hidinput_find_key(hid, scancode, 0); | 321 | usage = hidinput_find_key(hid, scancode, 0); |
322 | if (usage) { | 322 | if (usage) { |
323 | old_keycode = usage->code; | 323 | old_keycode = usage->code; |
324 | usage->code = keycode; | 324 | usage->code = keycode; |
325 | 325 | ||
326 | clear_bit(old_keycode, dev->keybit); | 326 | clear_bit(old_keycode, dev->keybit); |
327 | set_bit(usage->code, dev->keybit); | 327 | set_bit(usage->code, dev->keybit); |
328 | dbg_hid(KERN_DEBUG "Assigned keycode %d to HID usage code %x\n", keycode, scancode); | 328 | dbg_hid(KERN_DEBUG "Assigned keycode %d to HID usage code %x\n", keycode, scancode); |
@@ -330,10 +330,10 @@ static int hidinput_setkeycode(struct input_dev *dev, int scancode, | |||
330 | * by another key */ | 330 | * by another key */ |
331 | if (hidinput_find_key (hid, 0, old_keycode)) | 331 | if (hidinput_find_key (hid, 0, old_keycode)) |
332 | set_bit(old_keycode, dev->keybit); | 332 | set_bit(old_keycode, dev->keybit); |
333 | 333 | ||
334 | return 0; | 334 | return 0; |
335 | } | 335 | } |
336 | 336 | ||
337 | return -EINVAL; | 337 | return -EINVAL; |
338 | } | 338 | } |
339 | 339 | ||