From patchwork Thu Feb 26 23:20:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathias Gottschlag X-Patchwork-Id: 5896751 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9DF099F37F for ; Thu, 26 Feb 2015 23:21:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E4786203AE for ; Thu, 26 Feb 2015 23:21:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 14481203AB for ; Thu, 26 Feb 2015 23:21:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754711AbbBZXVU (ORCPT ); Thu, 26 Feb 2015 18:21:20 -0500 Received: from mail-we0-f174.google.com ([74.125.82.174]:37431 "EHLO mail-we0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754092AbbBZXUW (ORCPT ); Thu, 26 Feb 2015 18:20:22 -0500 Received: by wesw55 with SMTP id w55so15658625wes.4; Thu, 26 Feb 2015 15:20:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=0YHWMvMp8MwtstHFjQe9Utt5rO1/72OXR2VTvU7YiPY=; b=Y3bIZXtX7P/Whrtg0Pnfi7akHovKSeM5yqWNS0N0re9eaaS5Dy6PY2VR6qldTBTXf5 ZpPAOpIo59aCcduP0EiDnEmR6F1svon/+87/EuA72OnNL9zWlRiv9Q3a+rsyZhzi1+Ut GnY089iuL2pL25rQ+BE0Sf3OOmNtE/bxOjWVAr9Mc6Wgk+AVtF1RrPRZwPrFX4vA5YH6 wcKf0j0XW4vdaqsUNverUJ04FMOacLenc8RVkb9Mm+ooyUq62qSqn/A96Z6aHNYgOtzv qZcoHRNWgCr3OIETVFaYkcGZLFENOIO8oK8nNQnxqKdJFCsdVpTzR6kfIhhgNbTmh5Hf Ry9Q== X-Received: by 10.194.220.7 with SMTP id ps7mr22274074wjc.84.1424992821400; Thu, 26 Feb 2015 15:20:21 -0800 (PST) Received: from mathias-laptop.lan (HSI-KBW-37-209-111-36.hsi15.kabel-badenwuerttemberg.de. [37.209.111.36]) by mx.google.com with ESMTPSA id q10sm3408376wjr.41.2015.02.26.15.20.20 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 26 Feb 2015 15:20:20 -0800 (PST) From: Mathias Gottschlag To: Dmitry Torokhov Cc: Hans de Goede , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Mathias Gottschlag Subject: [PATCHv2 1/4] psmouse: Remove hardcoded touchpad size from the focaltech driver. Date: Fri, 27 Feb 2015 00:20:05 +0100 Message-Id: <1424992808-29891-2-git-send-email-mgottschlag@gmail.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1424992808-29891-1-git-send-email-mgottschlag@gmail.com> References: <1423940502-12353-1-git-send-email-mgottschlag@gmail.com> <1424992808-29891-1-git-send-email-mgottschlag@gmail.com> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The size has in most cases already been fetched from the touchpad, the hardcoded values should have been removed. Signed-off-by: Mathias Gottschlag --- drivers/input/mouse/focaltech.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/input/mouse/focaltech.c b/drivers/input/mouse/focaltech.c index fca38ba..5d8cf98 100644 --- a/drivers/input/mouse/focaltech.c +++ b/drivers/input/mouse/focaltech.c @@ -67,9 +67,6 @@ static void focaltech_reset(struct psmouse *psmouse) #define FOC_MAX_FINGERS 5 -#define FOC_MAX_X 2431 -#define FOC_MAX_Y 1663 - /* * Current state of a single finger on the touchpad. */ @@ -131,7 +128,7 @@ static void focaltech_report_state(struct psmouse *psmouse) if (active) { input_report_abs(dev, ABS_MT_POSITION_X, finger->x); input_report_abs(dev, ABS_MT_POSITION_Y, - FOC_MAX_Y - finger->y); + priv->y_max - finger->y); } } input_mt_report_pointer_emulation(dev, true);