Skip to contentSkip to conversation

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

PATCH Applied Stefan Achatz 2 participants 2 messages Aug 30, 2010 – Sep 1, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/hid/hid-roccat-pyra.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
(quoted diff) +0 -0

b/drivers/hid/hid-roccat-pyra.c
index 6c09c15..9bf2304 100644

drivers/hid/hid-roccat-pyra.c +0 -0
@@ -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, sizeof(struct pyra_roccat_report));

Signature · 1 line
1.7.2.2
Applied
#1 lore raw
Quoted 26 lines · Stefan Achatz

Pyra uses profile numbers in range 0-4 for everything except button events. Using range 1-5 consistent now.

---
 drivers/hid/hid-roccat-pyra.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
drivers/hid/hid-roccat-pyra.c +5 -1
index 6c09c15..9bf2304 100644
@@ -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,
Quoted 1 line

sizeof(struct pyra_roccat_report));

Applied.

Signature · 2 lines
Jiri Kosina
SUSE Labs, Novell Inc.