aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-roccat-pyra.c
diff options
context:
space:
mode:
authorStefan Achatz <stefan_achatz@web.de>2010-09-01 06:42:23 -0400
committerJiri Kosina <jkosina@suse.cz>2010-09-01 06:42:23 -0400
commitd2b570a5d451487f0c5026ea6113842b2eed4894 (patch)
tree967b809c72d09f466da0ca0e7550a7e525b1cbb9 /drivers/hid/hid-roccat-pyra.c
parentcb7cf3da0daa9830e00640da8f7d2380f4b4de42 (diff)
HID: roccat: Normalized reported profile number for pyra button events.
Pyra uses profile numbers in range 0-4 for everything except button events. Using range 1-5 consistent now. 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.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/hid/hid-roccat-pyra.c b/drivers/hid/hid-roccat-pyra.c
index 6c09c15d93ed..9bf23047892a 100644
--- a/drivers/hid/hid-roccat-pyra.c
+++ b/drivers/hid/hid-roccat-pyra.c
@@ -902,7 +902,11 @@ static void pyra_report_to_chrdev(struct pyra_device const *pyra,
902 if (button_event->data2 == PYRA_MOUSE_EVENT_BUTTON_PRESS) { 902 if (button_event->data2 == PYRA_MOUSE_EVENT_BUTTON_PRESS) {
903 roccat_report.type = button_event->type; 903 roccat_report.type = button_event->type;
904 roccat_report.key = button_event->data1; 904 roccat_report.key = button_event->data1;
905 roccat_report.value = pyra->actual_profile; 905 /*
906 * pyra reports profile numbers with range 1-5.
907 * Keeping this behaviour.
908 */
909 roccat_report.value = pyra->actual_profile + 1;
906 roccat_report_event(pyra->chrdev_minor, 910 roccat_report_event(pyra->chrdev_minor,
907 (uint8_t const *)&roccat_report, 911 (uint8_t const *)&roccat_report,
908 sizeof(struct pyra_roccat_report)); 912 sizeof(struct pyra_roccat_report));