aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-roccat-kone.c
diff options
context:
space:
mode:
authorStefan Achatz <erazor_de@users.sourceforge.net>2011-01-30 07:38:25 -0500
committerJiri Kosina <jkosina@suse.cz>2011-02-03 10:37:28 -0500
commit8211e46004518c977f70f2661da961d5ba617399 (patch)
treeb2ae1cdc75fad9dbdece7b1dd5fc23ce0624f3c2 /drivers/hid/hid-roccat-kone.c
parent432762e28b8146d0feff61cc8063b26c517acf26 (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-kone.c')
-rw-r--r--drivers/hid/hid-roccat-kone.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/hid/hid-roccat-kone.c b/drivers/hid/hid-roccat-kone.c
index 551665359eba..5cdb282dad11 100644
--- a/drivers/hid/hid-roccat-kone.c
+++ b/drivers/hid/hid-roccat-kone.c
@@ -30,8 +30,8 @@
30#include <linux/hid.h> 30#include <linux/hid.h>
31#include <linux/module.h> 31#include <linux/module.h>
32#include <linux/slab.h> 32#include <linux/slab.h>
33#include <linux/roccat.h>
33#include "hid-ids.h" 34#include "hid-ids.h"
34#include "hid-roccat.h"
35#include "hid-roccat-common.h" 35#include "hid-roccat-common.h"
36#include "hid-roccat-kone.h" 36#include "hid-roccat-kone.h"
37 37
@@ -660,7 +660,8 @@ static int kone_init_specials(struct hid_device *hdev)
660 goto exit_free; 660 goto exit_free;
661 } 661 }
662 662
663 retval = roccat_connect(kone_class, hdev); 663 retval = roccat_connect(kone_class, hdev,
664 sizeof(struct kone_roccat_report));
664 if (retval < 0) { 665 if (retval < 0) {
665 hid_err(hdev, "couldn't init char dev\n"); 666 hid_err(hdev, "couldn't init char dev\n");
666 /* be tolerant about not getting chrdev */ 667 /* be tolerant about not getting chrdev */
@@ -760,8 +761,7 @@ static void kone_report_to_chrdev(struct kone_device const *kone,
760 roccat_report.value = event->value; 761 roccat_report.value = event->value;
761 roccat_report.key = 0; 762 roccat_report.key = 0;
762 roccat_report_event(kone->chrdev_minor, 763 roccat_report_event(kone->chrdev_minor,
763 (uint8_t *)&roccat_report, 764 (uint8_t *)&roccat_report);
764 sizeof(struct kone_roccat_report));
765 break; 765 break;
766 case kone_mouse_event_call_overlong_macro: 766 case kone_mouse_event_call_overlong_macro:
767 if (event->value == kone_keystroke_action_press) { 767 if (event->value == kone_keystroke_action_press) {
@@ -769,8 +769,7 @@ static void kone_report_to_chrdev(struct kone_device const *kone,
769 roccat_report.value = kone->actual_profile; 769 roccat_report.value = kone->actual_profile;
770 roccat_report.key = event->macro_key; 770 roccat_report.key = event->macro_key;
771 roccat_report_event(kone->chrdev_minor, 771 roccat_report_event(kone->chrdev_minor,
772 (uint8_t *)&roccat_report, 772 (uint8_t *)&roccat_report);
773 sizeof(struct kone_roccat_report));
774 } 773 }
775 break; 774 break;
776 } 775 }