diff mbox

HID: roccat: Normalized reported profile number for pyra button events.

Message ID 1283196536.2059.0.camel@neuromancer (mailing list archive)
State New, archived
Delegated to: Jiri Kosina
Headers show

Commit Message

Stefan Achatz Aug. 30, 2010, 7:28 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/hid/hid-roccat-pyra.c
b/drivers/hid/hid-roccat-pyra.c
index 6c09c15..9bf2304 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,
 		if (button_event->data2 == PYRA_MOUSE_EVENT_BUTTON_PRESS) {
 			roccat_report.type = button_event->type;
 			roccat_report.key = button_event->data1;
-			roccat_report.value = pyra->actual_profile;
+			/*
+			 * pyra reports profile numbers with range 1-5.
+			 * Keeping this behaviour.
+			 */
+			roccat_report.value = pyra->actual_profile + 1;
 			roccat_report_event(pyra->chrdev_minor,
 					(uint8_t const *)&roccat_report,