From patchwork Thu Apr 27 12:22:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kepplinger X-Patchwork-Id: 9702843 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 5EB7960225 for ; Thu, 27 Apr 2017 12:23:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 435B02858D for ; Thu, 27 Apr 2017 12:23:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 37CAD28619; Thu, 27 Apr 2017 12:23:50 +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=-1.9 required=2.0 tests=BAYES_00 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 6333F28624 for ; Thu, 27 Apr 2017 12:23:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754429AbdD0MXK (ORCPT ); Thu, 27 Apr 2017 08:23:10 -0400 Received: from mail.ginzinger.com ([31.193.165.229]:52601 "EHLO mail.ginzinger.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754345AbdD0MXJ (ORCPT ); Thu, 27 Apr 2017 08:23:09 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.ginzinger.com (Postfix) with ESMTP id A0F0D404E; Thu, 27 Apr 2017 14:23:10 +0200 (CEST) X-Virus-Scanned: by amavisd-new-2.10.1 (20141025) (Debian) at ginzinger.com Received: from mail.ginzinger.com ([127.0.0.1]) by localhost (mail.ginzinger.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id B2_hNi7T2oUc; Thu, 27 Apr 2017 14:23:09 +0200 (CEST) Received: from mail.ginzinger.com (unknown [10.1.1.201]) by mail.ginzinger.com (Postfix) with ESMTPS id ACBEB405B; Thu, 27 Apr 2017 14:23:09 +0200 (CEST) Received: from martin-laptop.buero.ginzinger.com (10.10.1.120) by exc2.buero.ginzinger.com (10.1.1.201) with Microsoft SMTP Server (TLS) id 14.3.339.0; Thu, 27 Apr 2017 14:23:05 +0200 From: Martin Kepplinger To: CC: , , Martin Kepplinger Subject: [PATCH 2/2] input: touchscreen: ar1021_i2c: replace magic number with definition Date: Thu, 27 Apr 2017 14:22:36 +0200 Message-ID: <1493295756-17812-2-git-send-email-martin.kepplinger@ginzinger.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1493295756-17812-1-git-send-email-martin.kepplinger@ginzinger.com> References: <1493295756-17812-1-git-send-email-martin.kepplinger@ginzinger.com> MIME-Version: 1.0 X-Originating-IP: [10.10.1.120] 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 We now have a few of this device's definitions. Let's avoid magic numbers and use them. Signed-off-by: Martin Kepplinger --- drivers/input/touchscreen/ar1021_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/ar1021_i2c.c b/drivers/input/touchscreen/ar1021_i2c.c index 2a76231..edd5268 100644 --- a/drivers/input/touchscreen/ar1021_i2c.c +++ b/drivers/input/touchscreen/ar1021_i2c.c @@ -44,7 +44,7 @@ static irqreturn_t ar1021_i2c_irq(int irq, void *dev_id) goto out; /* sync bit set ? */ - if ((data[0] & 0x80) == 0) + if ((data[0] & AR1021_TOUCH) == 0) goto out; button = data[0] & BIT(0);