diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-10 11:15:37 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-10 11:15:37 -0500 |
commit | facc7a96d443d84060a8679c3fcc51d20d4981c3 (patch) | |
tree | e2d633b07766609aedac0708adcde2bc2e37e68a /drivers/hid/hid-input.c | |
parent | c8940eca75e6d1ea57f6c491a30bd1023c64c9ad (diff) | |
parent | 4ead36407b41eae942c8c9f70ef963cd369c90e2 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (34 commits)
HID: roccat: Update sysfs attribute doc
HID: roccat: don't use #pragma pack
HID: roccat: Add support for Roccat Kone[+] v2
HID: roccat: reduce number of functions in kone and pyra drivers
HID: roccat: declare meaning of pack pragma usage in driver headers
HID: roccat: use class for char device for sysfs attribute creation
sysfs: Introducing binary attributes for struct class
HID: hidraw: add compatibility ioctl() for 32-bit applications.
HID: hid-picolcd: Fix memory leak in picolcd_debug_out_report()
HID: picolcd: fix misuse of logical operation in place of bitop
HID: usbhid: base runtime PM on modern API
HID: replace offsets values with their corresponding BTN_* defines
HID: hid-mosart: support suspend/resume
HID: hid-mosart: ignore buttons report
HID: hid-picolcd: don't use flush_scheduled_work()
HID: simplify an index check in hid_lookup_collection
HID: Hoist assigns from ifs
HID: Remove superfluous __inline__
HID: Use vzalloc for vmalloc/memset(,0...)
HID: Add and use hid_<level>: dev_<level> equivalents
...
Diffstat (limited to 'drivers/hid/hid-input.c')
-rw-r--r-- | drivers/hid/hid-input.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index d8d372bae3cc..e60fdb88101f 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c | |||
@@ -319,21 +319,21 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel | |||
319 | 319 | ||
320 | switch (field->application) { | 320 | switch (field->application) { |
321 | case HID_GD_MOUSE: | 321 | case HID_GD_MOUSE: |
322 | case HID_GD_POINTER: code += 0x110; break; | 322 | case HID_GD_POINTER: code += BTN_MOUSE; break; |
323 | case HID_GD_JOYSTICK: | 323 | case HID_GD_JOYSTICK: |
324 | if (code <= 0xf) | 324 | if (code <= 0xf) |
325 | code += BTN_JOYSTICK; | 325 | code += BTN_JOYSTICK; |
326 | else | 326 | else |
327 | code += BTN_TRIGGER_HAPPY; | 327 | code += BTN_TRIGGER_HAPPY; |
328 | break; | 328 | break; |
329 | case HID_GD_GAMEPAD: code += 0x130; break; | 329 | case HID_GD_GAMEPAD: code += BTN_GAMEPAD; break; |
330 | default: | 330 | default: |
331 | switch (field->physical) { | 331 | switch (field->physical) { |
332 | case HID_GD_MOUSE: | 332 | case HID_GD_MOUSE: |
333 | case HID_GD_POINTER: code += 0x110; break; | 333 | case HID_GD_POINTER: code += BTN_MOUSE; break; |
334 | case HID_GD_JOYSTICK: code += 0x120; break; | 334 | case HID_GD_JOYSTICK: code += BTN_JOYSTICK; break; |
335 | case HID_GD_GAMEPAD: code += 0x130; break; | 335 | case HID_GD_GAMEPAD: code += BTN_GAMEPAD; break; |
336 | default: code += 0x100; | 336 | default: code += BTN_MISC; |
337 | } | 337 | } |
338 | } | 338 | } |
339 | 339 | ||
@@ -817,14 +817,14 @@ static int hidinput_open(struct input_dev *dev) | |||
817 | { | 817 | { |
818 | struct hid_device *hid = input_get_drvdata(dev); | 818 | struct hid_device *hid = input_get_drvdata(dev); |
819 | 819 | ||
820 | return hid->ll_driver->open(hid); | 820 | return hid_hw_open(hid); |
821 | } | 821 | } |
822 | 822 | ||
823 | static void hidinput_close(struct input_dev *dev) | 823 | static void hidinput_close(struct input_dev *dev) |
824 | { | 824 | { |
825 | struct hid_device *hid = input_get_drvdata(dev); | 825 | struct hid_device *hid = input_get_drvdata(dev); |
826 | 826 | ||
827 | hid->ll_driver->close(hid); | 827 | hid_hw_close(hid); |
828 | } | 828 | } |
829 | 829 | ||
830 | /* | 830 | /* |
@@ -871,7 +871,7 @@ int hidinput_connect(struct hid_device *hid, unsigned int force) | |||
871 | if (!hidinput || !input_dev) { | 871 | if (!hidinput || !input_dev) { |
872 | kfree(hidinput); | 872 | kfree(hidinput); |
873 | input_free_device(input_dev); | 873 | input_free_device(input_dev); |
874 | err_hid("Out of memory during hid input probe"); | 874 | hid_err(hid, "Out of memory during hid input probe\n"); |
875 | goto out_unwind; | 875 | goto out_unwind; |
876 | } | 876 | } |
877 | 877 | ||