From patchwork Sat Aug 21 13:50:03 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Fritz X-Patchwork-Id: 121831 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o7LDkQ8q012286 for ; Sat, 21 Aug 2010 13:46:26 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751737Ab0HUNqA (ORCPT ); Sat, 21 Aug 2010 09:46:00 -0400 Received: from mail-fx0-f46.google.com ([209.85.161.46]:41060 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751459Ab0HUNp7 (ORCPT ); Sat, 21 Aug 2010 09:45:59 -0400 Received: by fxm13 with SMTP id 13so2270843fxm.19 for ; Sat, 21 Aug 2010 06:45:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:references:mime-version:content-type:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=TL+1PAsW9Zgumkmm/J7fidavl/6P+61i/6jsnDAZQtA=; b=t24jgyo2bv/4AYLab0nOXpDghrDURZLYfKwkdiI5K7jBoD1rOPlOn2+GBUYLIBlkYK H1w4/W0s2BddgwThJYAzpBZL48D2Qvw3eYxaTxOJvsBMPfnqoGPuCffUEyfvdFL+N/3s dcc8r7Zp03Pwqrls+dSYHS+Iw2aE1J624BDW4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:content-transfer-encoding :in-reply-to:user-agent; b=u+HWMK5LksUNimMLhLL/smZzamGBpcLfnhABqUr3FRRxUeY67ETmHg1c/Jq5Ka0lHK BSoxzDTRn19QAM9OzWiMDB6yD8MYqhjCEJULh/2uKlP/CpjGFqSnF79E1SGPxMfumF3K 8elFypG6OMK7DzKzZdUDS2XfxHlrE1SuXjM3w= Received: by 10.223.111.78 with SMTP id r14mr2267435fap.29.1282398358198; Sat, 21 Aug 2010 06:45:58 -0700 (PDT) Received: from lovely.krouter (p3EE06211.dip.t-dialin.net [62.224.98.17]) by mx.google.com with ESMTPS id t6sm1621192faa.27.2010.08.21.06.45.54 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 21 Aug 2010 06:45:56 -0700 (PDT) Date: Sat, 21 Aug 2010 15:50:03 +0200 From: Christoph Fritz To: Dmitry Torokhov Cc: Bruno =?iso-8859-1?Q?Pr=E9mont?= , Daniel Mack , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] Input: mousedev - fix regression of inverting axes Message-ID: <20100821135002.GA3357@lovely.krouter> References: <20100820223316.4f6ac734@neptune.home> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20100820223316.4f6ac734@neptune.home> User-Agent: Mutt/1.5.20 (2009-06-14) 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 (demeter.kernel.org [140.211.167.41]); Sat, 21 Aug 2010 13:46:26 +0000 (UTC) diff --git a/drivers/input/mousedev.c b/drivers/input/mousedev.c index 83c24cc..d528a2d 100644 --- a/drivers/input/mousedev.c +++ b/drivers/input/mousedev.c @@ -138,8 +138,8 @@ static void mousedev_touchpad_event(struct input_dev *dev, fx(0) = value; if (mousedev->touch && mousedev->pkt_count >= 2) { - size = input_abs_get_min(dev, ABS_X) - - input_abs_get_max(dev, ABS_X); + size = input_abs_get_max(dev, ABS_X) - + input_abs_get_min(dev, ABS_X); if (size == 0) size = 256 * 2; @@ -155,8 +155,8 @@ static void mousedev_touchpad_event(struct input_dev *dev, fy(0) = value; if (mousedev->touch && mousedev->pkt_count >= 2) { /* use X size for ABS_Y to keep the same scale */ - size = input_abs_get_min(dev, ABS_X) - - input_abs_get_max(dev, ABS_X); + size = input_abs_get_max(dev, ABS_X) - + input_abs_get_min(dev, ABS_X); if (size == 0) size = 256 * 2;