From patchwork Thu Nov 5 23:38:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Duggan X-Patchwork-Id: 7564371 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id DB024C05C6 for ; Thu, 5 Nov 2015 23:39:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1122120800 for ; Thu, 5 Nov 2015 23:39:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 44810207FD for ; Thu, 5 Nov 2015 23:39:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965518AbbKEXio (ORCPT ); Thu, 5 Nov 2015 18:38:44 -0500 Received: from us-mx2.synaptics.com ([192.147.44.131]:14999 "EHLO us-mx1.synaptics.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S965366AbbKEXim (ORCPT ); Thu, 5 Nov 2015 18:38:42 -0500 Received: from unknown (HELO securemail.synaptics.com) ([172.20.21.135]) by us-mx1.synaptics.com with ESMTP; 05 Nov 2015 15:38:41 -0800 Received: from USW-OWA1.synaptics-inc.local ([10.20.24.16]) by securemail.synaptics.com (PGP Universal service); Thu, 05 Nov 2015 16:39:05 -0800 X-PGP-Universal: processed; by securemail.synaptics.com on Thu, 05 Nov 2015 16:39:05 -0800 Received: from noble.synaptics-inc.local (10.4.10.145) by USW-OWA1.synaptics-inc.local (10.20.24.16) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 5 Nov 2015 15:38:41 -0800 From: Andrew Duggan To: , CC: Benjamin Tissoires , Dmitry Torokhov , Linus Walleij , Benjamin Tissoires , Christopher Heiny , Stephen Chandler Paul Subject: [PATCH 07/26] Input: synaptics-rmi4 - f11: fix bitmap irq check Date: Thu, 5 Nov 2015 15:38:33 -0800 Message-ID: <1446766713-30532-1-git-send-email-aduggan@synaptics.com> X-Mailer: git-send-email 2.1.4 MIME-Version: 1.0 X-Originating-IP: [10.4.10.145] 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.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 From: Benjamin Tissoires num_irq_regs is the count of registers of 1 bytes that we use to check the irqs. bitmap_and() expects the number of bits. Signed-off-by: Benjamin Tissoires Tested-by: Andrew Duggan Acked-by: Linus Walleij --- drivers/input/rmi4/rmi_f11.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/input/rmi4/rmi_f11.c b/drivers/input/rmi4/rmi_f11.c index 0028176..7fd808f 100644 --- a/drivers/input/rmi4/rmi_f11.c +++ b/drivers/input/rmi4/rmi_f11.c @@ -726,12 +726,12 @@ static void rmi_f11_finger_handler(struct f11_data *f11, } abs_bits = bitmap_and(f11->result_bits, irq_bits, f11->abs_mask, - num_irq_regs); + num_irq_regs * 8); if (abs_bits) rmi_f11_abs_pos_report(f11, sensor, finger_state, i); rel_bits = bitmap_and(f11->result_bits, irq_bits, f11->rel_mask, - num_irq_regs); + num_irq_regs * 8); if (rel_bits) rmi_f11_rel_pos_report(sensor, i); }