lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1283196536.2059.0.camel@neuromancer>
Date:	Mon, 30 Aug 2010 21:28:56 +0200
From:	Stefan Achatz <stefan_achatz@....de>
To:	Randy Dunlap <rdunlap@...otime.net>,
	Stefan Achatz <erazor_de@...rs.sourceforge.net>,
	Jiri Kosina <jkosina@...e.cz>,
	Bruno Prémont <bonbons@...ux-vserver.org>,
	Stephane Chatty <chatty@...c.fr>,
	Don Prince <dhprince-devel@...oo.co.uk>,
	Dmitry Torokhov <dtor@...l.ru>,
	Kees Bakker <kees.bakker@...all.nl>, linux-doc@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-input@...r.kernel.org
Subject: [PATCH] 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@...rs.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



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ