From patchwork Thu Jan 6 22:24:48 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: 460981 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 p06MMjCE007526 for ; Thu, 6 Jan 2011 22:23:19 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754377Ab1AFWXT (ORCPT ); Thu, 6 Jan 2011 17:23:19 -0500 Received: from mga02.intel.com ([134.134.136.20]:3362 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754373Ab1AFWXS (ORCPT ); Thu, 6 Jan 2011 17:23:18 -0500 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 06 Jan 2011 14:23:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.60,285,1291622400"; d="scan'208";a="590613399" Received: from unknown (HELO kcaccard-MOBL3.jf.intel.com) ([10.7.196.152]) by orsmga002.jf.intel.com with ESMTP; 06 Jan 2011 14:23:14 -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:24:48 -0800 Message-Id: <1294352688-29564-1-git-send-email-kristen@linux.intel.com> X-Mailer: git-send-email 1.7.2.3 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:23:20 +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; } }