public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] HID: roccat: Normalized reported profile number for pyra button events.
@ 2010-08-30 19:28 Stefan Achatz
  2010-09-01 10:43 ` Jiri Kosina
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Achatz @ 2010-08-30 19:28 UTC (permalink / raw)
  To: Randy Dunlap, Stefan Achatz, Jiri Kosina, Bruno Prémont,
	Stephane Chatty, Don Prince, Dmitry Torokhov, Kees Bakker,
	linux-doc, linux-kernel, linux-input

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>
---
 drivers/hid/hid-roccat-pyra.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

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,
 					sizeof(struct pyra_roccat_report));
-- 
1.7.2.2




^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-09-01 10:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-30 19:28 [PATCH] HID: roccat: Normalized reported profile number for pyra button events Stefan Achatz
2010-09-01 10:43 ` Jiri Kosina

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox