public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Stefan Achatz <stefan_achatz@web.de>
To: "Randy Dunlap" <rdunlap@xenotime.net>,
	"Stefan Achatz" <erazor_de@users.sourceforge.net>,
	"Jiri Kosina" <jkosina@suse.cz>,
	"Bruno Prémont" <bonbons@linux-vserver.org>,
	"Stephane Chatty" <chatty@enac.fr>,
	"Don Prince" <dhprince-devel@yahoo.co.uk>,
	"Dmitry Torokhov" <dtor@mail.ru>,
	"Kees Bakker" <kees.bakker@xs4all.nl>,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-input@vger.kernel.org
Subject: [PATCH] HID: roccat: Normalized reported profile number for pyra button events.
Date: Mon, 30 Aug 2010 21:28:56 +0200	[thread overview]
Message-ID: <1283196536.2059.0.camel@neuromancer> (raw)

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




             reply	other threads:[~2010-08-30 19:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-30 19:28 Stefan Achatz [this message]
2010-09-01 10:43 ` [PATCH] HID: roccat: Normalized reported profile number for pyra button events Jiri Kosina

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1283196536.2059.0.camel@neuromancer \
    --to=stefan_achatz@web.de \
    --cc=bonbons@linux-vserver.org \
    --cc=chatty@enac.fr \
    --cc=dhprince-devel@yahoo.co.uk \
    --cc=dtor@mail.ru \
    --cc=erazor_de@users.sourceforge.net \
    --cc=jkosina@suse.cz \
    --cc=kees.bakker@xs4all.nl \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rdunlap@xenotime.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox