diff options
author | Stefan Achatz <erazor_de@users.sourceforge.net> | 2011-01-30 07:38:25 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2011-02-03 10:37:28 -0500 |
commit | 8211e46004518c977f70f2661da961d5ba617399 (patch) | |
tree | b2ae1cdc75fad9dbdece7b1dd5fc23ce0624f3c2 /drivers/hid/hid-roccat-pyra.c | |
parent | 432762e28b8146d0feff61cc8063b26c517acf26 (diff) |
HID: roccat: Add ioctl command to retreive report size from chardev
Roccat chardev was reworked to support only a defined report size per
device and this can be retreived by an ioctl now to enable future changes
in report definitions.
Header was moved/renamed from drivers/hid to include/linux for accessibility.
Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-roccat-pyra.c')
-rw-r--r-- | drivers/hid/hid-roccat-pyra.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/hid/hid-roccat-pyra.c b/drivers/hid/hid-roccat-pyra.c index abe77d3e6d8b..be4daa96f7c2 100644 --- a/drivers/hid/hid-roccat-pyra.c +++ b/drivers/hid/hid-roccat-pyra.c | |||
@@ -22,8 +22,8 @@ | |||
22 | #include <linux/hid.h> | 22 | #include <linux/hid.h> |
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/slab.h> | 24 | #include <linux/slab.h> |
25 | #include <linux/roccat.h> | ||
25 | #include "hid-ids.h" | 26 | #include "hid-ids.h" |
26 | #include "hid-roccat.h" | ||
27 | #include "hid-roccat-common.h" | 27 | #include "hid-roccat-common.h" |
28 | #include "hid-roccat-pyra.h" | 28 | #include "hid-roccat-pyra.h" |
29 | 29 | ||
@@ -506,7 +506,8 @@ static int pyra_init_specials(struct hid_device *hdev) | |||
506 | goto exit_free; | 506 | goto exit_free; |
507 | } | 507 | } |
508 | 508 | ||
509 | retval = roccat_connect(pyra_class, hdev); | 509 | retval = roccat_connect(pyra_class, hdev, |
510 | sizeof(struct pyra_roccat_report)); | ||
510 | if (retval < 0) { | 511 | if (retval < 0) { |
511 | hid_err(hdev, "couldn't init char dev\n"); | 512 | hid_err(hdev, "couldn't init char dev\n"); |
512 | } else { | 513 | } else { |
@@ -610,8 +611,7 @@ static void pyra_report_to_chrdev(struct pyra_device const *pyra, | |||
610 | roccat_report.value = button_event->data1; | 611 | roccat_report.value = button_event->data1; |
611 | roccat_report.key = 0; | 612 | roccat_report.key = 0; |
612 | roccat_report_event(pyra->chrdev_minor, | 613 | roccat_report_event(pyra->chrdev_minor, |
613 | (uint8_t const *)&roccat_report, | 614 | (uint8_t const *)&roccat_report); |
614 | sizeof(struct pyra_roccat_report)); | ||
615 | break; | 615 | break; |
616 | case PYRA_MOUSE_EVENT_BUTTON_TYPE_MACRO: | 616 | case PYRA_MOUSE_EVENT_BUTTON_TYPE_MACRO: |
617 | case PYRA_MOUSE_EVENT_BUTTON_TYPE_SHORTCUT: | 617 | case PYRA_MOUSE_EVENT_BUTTON_TYPE_SHORTCUT: |
@@ -625,8 +625,7 @@ static void pyra_report_to_chrdev(struct pyra_device const *pyra, | |||
625 | */ | 625 | */ |
626 | roccat_report.value = pyra->actual_profile + 1; | 626 | roccat_report.value = pyra->actual_profile + 1; |
627 | roccat_report_event(pyra->chrdev_minor, | 627 | roccat_report_event(pyra->chrdev_minor, |
628 | (uint8_t const *)&roccat_report, | 628 | (uint8_t const *)&roccat_report); |
629 | sizeof(struct pyra_roccat_report)); | ||
630 | } | 629 | } |
631 | break; | 630 | break; |
632 | } | 631 | } |