From patchwork Mon Jul 11 14:07:36 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: axel lin X-Patchwork-Id: 964962 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p6BE8BfW005276 for ; Mon, 11 Jul 2011 14:08:11 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757610Ab1GKOHr (ORCPT ); Mon, 11 Jul 2011 10:07:47 -0400 Received: from mail-vx0-f174.google.com ([209.85.220.174]:34766 "EHLO mail-vx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757594Ab1GKOHq (ORCPT ); Mon, 11 Jul 2011 10:07:46 -0400 Received: by vxb39 with SMTP id 39so2679123vxb.19 for ; Mon, 11 Jul 2011 07:07:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=subject:from:to:cc:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; bh=pCUADLd8Vos0Zw2rBugqAOtEKdFsDAeeaqLyYIdOgIo=; b=azuzlrK7nzQiEE2STtgLekk5Jlj0X91Y1pxXCpd4kpI06czHnvaJcOBZxpDSbqyZTb ZjhF/23wv3qTUUW64/DAZkSy5j8+j1dAQ22q3gdlhasDkZ8KXGIafoyk141KSIK1E+PS RF342yWqzJkqfZKTyXCj7cJbl1l1mrDYp9Sd8= Received: by 10.52.76.198 with SMTP id m6mr5747464vdw.0.1310393265139; Mon, 11 Jul 2011 07:07:45 -0700 (PDT) Received: from [218.172.225.204] (218-172-225-204.dynamic.hinet.net [218.172.225.204]) by mx.google.com with ESMTPS id ck16sm4489389vdb.44.2011.07.11.07.07.42 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 11 Jul 2011 07:07:44 -0700 (PDT) Subject: [PATCH 1/2] Input: atkbd - make dmi callback functions return 1 From: Axel Lin To: linux-kernel@vger.kernel.org Cc: Vojtech Pavlik , Dmitry Torokhov , linux-input@vger.kernel.org Date: Mon, 11 Jul 2011 22:07:36 +0800 Message-ID: <1310393256.2415.2.camel@phoenix> Mime-Version: 1.0 X-Mailer: Evolution 2.32.2 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 (demeter2.kernel.org [140.211.167.43]); Mon, 11 Jul 2011 14:08:11 +0000 (UTC) We only care about if there is a successful match from the table (or no match at all), we can make dmi_check_system return immediately if we have a successful match instead of iterate thorough the whole table. Make the dmi callback function return 1 then dmi_check_system will return immediately if we have a successful match. Signed-off-by: Axel Lin --- drivers/input/keyboard/atkbd.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c index 11478eb..19cfc0c 100644 --- a/drivers/input/keyboard/atkbd.c +++ b/drivers/input/keyboard/atkbd.c @@ -1578,14 +1578,14 @@ static int __init atkbd_setup_forced_release(const struct dmi_system_id *id) atkbd_platform_fixup = atkbd_apply_forced_release_keylist; atkbd_platform_fixup_data = id->driver_data; - return 0; + return 1; } static int __init atkbd_setup_scancode_fixup(const struct dmi_system_id *id) { atkbd_platform_scancode_fixup = id->driver_data; - return 0; + return 1; } static const struct dmi_system_id atkbd_dmi_quirk_table[] __initconst = {