From patchwork Thu Jan 6 22:29:09 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kristen Carlson Accardi X-Patchwork-Id: 461221 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 p06MSD2c010546 for ; Thu, 6 Jan 2011 22:28:42 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754589Ab1AFW13 (ORCPT ); Thu, 6 Jan 2011 17:27:29 -0500 Received: from mga09.intel.com ([134.134.136.24]:13338 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754779Ab1AFW10 (ORCPT ); Thu, 6 Jan 2011 17:27:26 -0500 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 06 Jan 2011 14:27:26 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.60,285,1291622400"; d="scan'208";a="590614266" Received: from unknown (HELO kcaccard-MOBL3.jf.intel.com) ([10.7.196.152]) by orsmga002.jf.intel.com with ESMTP; 06 Jan 2011 14:27:26 -0800 From: Kristen Carlson Accardi To: linux-input@vger.kernel.org Cc: Kristen Carlson Accardi Subject: [PATCH] input: move check for same handler in input_pass_event Date: Thu, 6 Jan 2011 14:29:09 -0800 Message-Id: <1294352949-29645-1-git-send-email-kristen@linux.intel.com> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <1294352688-29564-1-git-send-email-kristen@linux.intel.com> References: <1294352688-29564-1-git-send-email-kristen@linux.intel.com> 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]); Thu, 06 Jan 2011 22:28:43 +0000 (UTC) diff --git a/drivers/input/input.c b/drivers/input/input.c index db409d6..cdeb929 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c @@ -98,16 +98,15 @@ static void input_pass_event(struct input_dev *dev, * particular event we want to skip it to avoid * filters firing again and again. */ - if (handler == src_handler) - continue; - if (!handler->filter) { if (filtered) break; handler->event(handle, type, code, value); - } else if (handler->filter(handle, type, code, value)) + } else if (handler != src_handler && + handler->filter(handle, type, code, + value)) filtered = true; } }