From patchwork Fri Feb 17 22:56:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 9580859 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 244546043A for ; Fri, 17 Feb 2017 22:56:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1CB7D28775 for ; Fri, 17 Feb 2017 22:56:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1193928795; Fri, 17 Feb 2017 22:56:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B186928775 for ; Fri, 17 Feb 2017 22:56:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964776AbdBQW4c (ORCPT ); Fri, 17 Feb 2017 17:56:32 -0500 Received: from mail-pg0-f65.google.com ([74.125.83.65]:36148 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964811AbdBQW4b (ORCPT ); Fri, 17 Feb 2017 17:56:31 -0500 Received: by mail-pg0-f65.google.com with SMTP id a123so3167923pgc.3; Fri, 17 Feb 2017 14:56:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=N4Yg8Z6/RdOuvH8oU+zdsiK8reLbiwQe+tbT8C3VzrY=; b=WHylU3THgAXfdIehIj+W84IaBoln3Glm1reIkAvbMfEYWxtTqaPAcG0zeANdJpcZ7S uxCcAiKnPeShrK/d6l9dvz8rDeRjTvoueA6BnLG5VAjsgn+7+D2wWFmQTahl+5uXcEZ4 VY/iftv3YXwunkfm5mHwjOAZwFCRIYq8LtZjnjEpb1NrMaHYC9bKzCDaxxZa6one9z0T j/hCQ7MM68ZtNfMAUIx9M/zVIvPcAKCy32wD2DJqRZAF1uUksStF516F8TgctSv8U8jE Pc6/Tag/Kq+KTXiR6qjRtDc4yNys58LcUe4a8sHpdthRr/UCUnhKTFVmKz6iWJYdHPsG F83w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=N4Yg8Z6/RdOuvH8oU+zdsiK8reLbiwQe+tbT8C3VzrY=; b=HL4ukaEQqwZXz5nrah55H6fdRilpFLqt5TN0Pll2JJRN7U2Swly8t9x47ZkDQLAfE6 y+6AbebffIAlEIQDZdcU2WbGE6SDanch9eEnuDtkHX0HwNOBdSigbxsjP8ct3HqUG/XG OvgXJz/UN7LM8WFJGK69Vumur4AGz2+/zW5YyNQhAPAy2x53OGh8Sr3zZyKjuonuDDrC tV3BH7fQN2h+3bRqxcp1gkVIS3N8GodQBxY9K/cnCBLoSCL7l3UmZNTc9fspual3fuT6 fyRMacRH8ZcHzq0cfn3JDKTcuwQJC+/n42uu6aplkiVxIBpUPBjbqlyC8SjNWepLM5Am LOCQ== X-Gm-Message-State: AMke39ldSE8UiESwgZNF1QmDq64Ks8TTgz8F0K7OPHB1D2PP60w/dDVAsD/+IGDLhmAuTg== X-Received: by 10.98.5.2 with SMTP id 2mr12197902pff.77.1487372190257; Fri, 17 Feb 2017 14:56:30 -0800 (PST) Received: from dtor-ws ([2620:0:1000:1311:2ca9:d776:a2a1:70e8]) by smtp.gmail.com with ESMTPSA id w125sm21562551pgb.11.2017.02.17.14.56.29 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Fri, 17 Feb 2017 14:56:29 -0800 (PST) Date: Fri, 17 Feb 2017 14:56:27 -0800 From: Dmitry Torokhov To: linux-input@vger.kernel.org Cc: "H. Nikolaus Schaller" , Jonathan Cameron , linux-kernel@vger.kernel.org Subject: [PATCH] Input: tsc2007 - switch to using input_set_capability() Message-ID: <20170217225627.GA27132@dtor-ws> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Do not manipulate evbit/keybit directly, use helper for that. Signed-off-by: Dmitry Torokhov --- drivers/input/touchscreen/tsc2007_core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/input/touchscreen/tsc2007_core.c b/drivers/input/touchscreen/tsc2007_core.c index fdf81a2b989a..98dbefc3357d 100644 --- a/drivers/input/touchscreen/tsc2007_core.c +++ b/drivers/input/touchscreen/tsc2007_core.c @@ -364,8 +364,7 @@ static int tsc2007_probe(struct i2c_client *client, input_set_drvdata(input_dev, ts); - input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); - input_dev->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH); + input_set_capability(input_dev, EV_KEY, BTN_TOUCH); input_set_abs_params(input_dev, ABS_X, 0, MAX_12BIT, ts->fuzzx, 0); input_set_abs_params(input_dev, ABS_Y, 0, MAX_12BIT, ts->fuzzy, 0);