From patchwork Wed Jan 15 22:04:17 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ping Cheng X-Patchwork-Id: 3494781 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0F88F9F2E9 for ; Wed, 15 Jan 2014 22:04:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4AC4720136 for ; Wed, 15 Jan 2014 22:04:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4354620158 for ; Wed, 15 Jan 2014 22:04:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753209AbaAOWEt (ORCPT ); Wed, 15 Jan 2014 17:04:49 -0500 Received: from mail-pb0-f54.google.com ([209.85.160.54]:40905 "EHLO mail-pb0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754546AbaAOWE1 (ORCPT ); Wed, 15 Jan 2014 17:04:27 -0500 Received: by mail-pb0-f54.google.com with SMTP id un15so1754007pbc.27 for ; Wed, 15 Jan 2014 14:04:27 -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; bh=ea6v/A8nD2NOhDBF6HP3sK/KKGpnYqG5GBEAdSriDwA=; b=Dz1veQtm/aL2kNuErxlSDBa6pgPGAJqaK64Xt7ZZGuj5VeOMIoTZP889cX4m1ZJfqO 0MBZ02j8Q/IBiElkPO/gSkPiKCv1rwCXqb9UFKdgXbi+dpTGlcfCbqI4gWc90StqNF4M WtrjLc+LML1K4XMmlieJv9Dt0i/sNEvAJ6SjAV6TGRH5RL/Khyhpy3V0gi4QGrJ3u2l3 nfYxS6KepW4y7Jr5nWbKwSIQxkKfAux7lk/zZkfVJqcGZuMFgQLg0n8WpYpC7surkXPR thnBjL/vNMBv+jSVM3AuRoVgKKYHfzYk0iD9bHSSkGlX8fG1ia+Vpx3tDLkFW8d5vfa1 IJ2A== X-Received: by 10.68.194.71 with SMTP id hu7mr5648352pbc.68.1389823467384; Wed, 15 Jan 2014 14:04:27 -0800 (PST) Received: from wacom-XPS-8500.wacom.com ([67.51.163.2]) by mx.google.com with ESMTPSA id db3sm10344823pbb.10.2014.01.15.14.04.25 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 15 Jan 2014 14:04:26 -0800 (PST) From: Ping Cheng To: linux-input@vger.kernel.org Cc: dmitry.torokhov@gmail.com, Ping Cheng Subject: [PATCH] Input: wacom - Fix wacom->shared guards for dual input devices Date: Wed, 15 Jan 2014 14:04:17 -0800 Message-Id: <1389823457-3649-1-git-send-email-pingc@wacom.com> X-Mailer: git-send-email 1.8.3.2 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 features->quirks can have multiple bits set. For dual input, we only need to check WACOM_QUIRK_MULTI_INPUT. Reviewed-by: Jason Gerecke Signed-off-by: Ping Cheng --- drivers/input/tablet/wacom_wac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c index 048e5b3..0bcc7a6 100644 --- a/drivers/input/tablet/wacom_wac.c +++ b/drivers/input/tablet/wacom_wac.c @@ -331,7 +331,7 @@ static int wacom_intuos_inout(struct wacom_wac *wacom) /* Enter report */ if ((data[1] & 0xfc) == 0xc0) { - if (features->quirks == WACOM_QUIRK_MULTI_INPUT) + if (features->quirks & WACOM_QUIRK_MULTI_INPUT) wacom->shared->stylus_in_proximity = true; /* serial number of the tool */ @@ -436,7 +436,7 @@ static int wacom_intuos_inout(struct wacom_wac *wacom) /* Exit report */ if ((data[1] & 0xfe) == 0x80) { - if (features->quirks == WACOM_QUIRK_MULTI_INPUT) + if (features->quirks & WACOM_QUIRK_MULTI_INPUT) wacom->shared->stylus_in_proximity = false; /*