From patchwork Fri Mar 18 13:27:55 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Tissoires X-Patchwork-Id: 643871 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 p2IDSmrU016713 for ; Fri, 18 Mar 2011 13:28:49 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756580Ab1CRN2k (ORCPT ); Fri, 18 Mar 2011 09:28:40 -0400 Received: from 89-230.252-81.static-ip.oleane.fr ([81.252.230.89]:39060 "EHLO smtp.lii-enac.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932113Ab1CRN1s (ORCPT ); Fri, 18 Mar 2011 09:27:48 -0400 Received: from gloupti.lii-enac.fr (unknown [10.0.0.110]) by smtp.lii-enac.fr (DoorWays) with ESMTP id 74E009526C; Fri, 18 Mar 2011 14:27:47 +0100 (CET) From: Benjamin Tissoires To: Dmitry Torokhov , Henrik Rydberg , Benjamin Tissoires , Jiri Kosina , Stephane Chatty , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 4/5] hid-multitouch: refactor initialization of ABS_MT_ORIENTATION Date: Fri, 18 Mar 2011 14:27:55 +0100 Message-Id: <1300454876-5017-5-git-send-email-benjamin.tissoires@enac.fr> X-Mailer: git-send-email 1.7.4 In-Reply-To: <1300454876-5017-1-git-send-email-benjamin.tissoires@enac.fr> References: <1300454876-5017-1-git-send-email-benjamin.tissoires@enac.fr> MIME-Version: 1.0 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 (demeter1.kernel.org [140.211.167.41]); Fri, 18 Mar 2011 13:28:49 +0000 (UTC) diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c index e6e1ea2..d31301e 100644 --- a/drivers/hid/hid-multitouch.c +++ b/drivers/hid/hid-multitouch.c @@ -235,9 +235,8 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi, case HID_DG_HEIGHT: hid_map_usage(hi, usage, bit, max, EV_ABS, ABS_MT_TOUCH_MINOR); - field->logical_maximum = 1; - field->logical_minimum = 0; - set_abs(hi->input, ABS_MT_ORIENTATION, field, 0); + input_set_abs_params(hi->input, + ABS_MT_ORIENTATION, 0, 1, 0, 0); td->last_slot_field = usage->hid; return 1; case HID_DG_TIPPRESSURE: