From patchwork Sat Aug 27 13:24:36 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Achatz X-Patchwork-Id: 1103762 X-Patchwork-Delegate: jikos@jikos.cz Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p7RDPg8b029459 for ; Sat, 27 Aug 2011 13:25:53 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751394Ab1H0NYl (ORCPT ); Sat, 27 Aug 2011 09:24:41 -0400 Received: from mail-in-14.arcor-online.net ([151.189.21.54]:41135 "EHLO mail-in-14.arcor-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751941Ab1H0NYj (ORCPT ); Sat, 27 Aug 2011 09:24:39 -0400 Received: from mail-in-21-z2.arcor-online.net (mail-in-21-z2.arcor-online.net [151.189.8.185]) by mx.arcor.de (Postfix) with ESMTP id BEDCA9BF97; Sat, 27 Aug 2011 15:24:37 +0200 (CEST) Received: from mail-in-10.arcor-online.net (mail-in-10.arcor-online.net [151.189.21.50]) by mail-in-21-z2.arcor-online.net (Postfix) with ESMTP id B5DD5ED92F; Sat, 27 Aug 2011 15:24:37 +0200 (CEST) Received: from [192.168.0.7] (dslb-188-105-218-067.pools.arcor-ip.net [188.105.218.67]) (Authenticated sender: screamingfist@arcor.de) by mail-in-10.arcor-online.net (Postfix) with ESMTPSA id 6C2DE2D67A2; Sat, 27 Aug 2011 15:24:37 +0200 (CEST) X-DKIM: Sendmail DKIM Filter v2.8.2 mail-in-10.arcor-online.net 6C2DE2D67A2 Subject: [PATCH 1/5] HID: roccat: Fixed false dpi reporting when using osd event From: Stefan Achatz Reply-To: erazor_de@users.sourceforge.net To: Jiri Kosina , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Date: Sat, 27 Aug 2011 15:24:36 +0200 Message-ID: <1314451476.24216.72.camel@neuromancer.tessier-ashpool> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 (2.30.3-1.fc13) 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.6 (demeter2.kernel.org [140.211.167.43]); Sat, 27 Aug 2011 13:25:53 +0000 (UTC) Actual dpi resolution was set on wrong occassion. Signed-off-by: Stefan Achatz --- drivers/hid/hid-roccat-kone.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/hid/hid-roccat-kone.c b/drivers/hid/hid-roccat-kone.c index 2b8f3a3..7847a5b 100644 --- a/drivers/hid/hid-roccat-kone.c +++ b/drivers/hid/hid-roccat-kone.c @@ -776,10 +776,10 @@ static void kone_keep_values_up_to_date(struct kone_device *kone, { switch (event->event) { case kone_mouse_event_switch_profile: + kone->actual_dpi = kone->profiles[event->value - 1]. + startup_dpi; case kone_mouse_event_osd_profile: kone->actual_profile = event->value; - kone->actual_dpi = kone->profiles[kone->actual_profile - 1]. - startup_dpi; break; case kone_mouse_event_switch_dpi: case kone_mouse_event_osd_dpi: