From patchwork Mon Aug 30 19:28:56 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Achatz X-Patchwork-Id: 143451 X-Patchwork-Delegate: jikos@jikos.cz Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o7UJTQU5022139 for ; Mon, 30 Aug 2010 19:29:27 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753632Ab0H3T27 (ORCPT ); Mon, 30 Aug 2010 15:28:59 -0400 Received: from fmmailgate03.web.de ([217.72.192.234]:34712 "EHLO fmmailgate03.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752282Ab0H3T26 (ORCPT ); Mon, 30 Aug 2010 15:28:58 -0400 Received: from smtp04.web.de ( [172.20.0.225]) by fmmailgate03.web.de (Postfix) with ESMTP id D7C9D15E4DF45; Mon, 30 Aug 2010 21:28:56 +0200 (CEST) Received: from [88.67.6.126] (helo=[192.168.0.7]) by smtp04.web.de with asmtp (TLSv1:AES256-SHA:256) (WEB.DE 4.110 #24) id 1OqA2K-0004Hu-00; Mon, 30 Aug 2010 21:28:56 +0200 Subject: [PATCH] HID: roccat: Normalized reported profile number for pyra button events. From: Stefan Achatz To: Randy Dunlap , Stefan Achatz , Jiri Kosina , Bruno =?ISO-8859-1?Q?Pr=E9mont?= , Stephane Chatty , Don Prince , Dmitry Torokhov , Kees Bakker , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org Date: Mon, 30 Aug 2010 21:28:56 +0200 Message-ID: <1283196536.2059.0.camel@neuromancer> Mime-Version: 1.0 X-Mailer: Evolution 2.30.2 (2.30.2-4.fc13) X-Sender: stefan_achatz@web.de X-Provags-ID: V01U2FsdGVkX198wRZ6rKN02PL3b+TAoxUE3JlwXJmQg2gbHQbM xpDtn6+TFvS0b63PdE9CNWQYhoSS3J8khHfOppySFIxLmUGbjM v6wGAgVAaUjzaCNoPTHQ== Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Mon, 30 Aug 2010 19:29:27 +0000 (UTC) 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,