From: Axel Lin <axel.lin@gmail.com>
To: linux-kernel <linux-kernel@vger.kernel.org>
Cc: Cezary Jackiewicz <cezary.jackiewicz@gmail.com>,
Matthew Garrett <mjg@redhat.com>,
Tim Gardner <tim.gardner@canonical.com>,
Mario Limonciello <Mario_Limonciello@Dell.com>,
Richard Purdie <rpurdie@linux.intel.com>,
Michal Marek <mmarek@suse.cz>,
Jonathan Woithe <jwoithe@physics.adelaide.edu.au>,
Len Brown <len.brown@intel.com>,
Andrew Morton <akpm@linux-foundation.org>,
Stefani Seibold <stefani@seibold.net>,
Andi Kleen <ak@linux.intel.com>,
Lennart Poettering <mzxreary@0pointer.de>,
"Lee, Chun-Yi" <jlee@novell.com>,
platform-driver-x86@vger.kernel.org
Subject: [PATCH] compal-laptop/fujitsu-laptop/msi-laptop: make dmi_check_cb to return 1 instead of 0
Date: Fri, 02 Jul 2010 17:04:13 +0800 [thread overview]
Message-ID: <1278061453.15256.1.camel@mola> (raw)
dmi_check_system() walks the table running matching functions until someone
returns non zero or we hit the end.
This patch makes dmi_check_cb to return 1 so dmi_check_system() return
immediately when a match is found.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
drivers/platform/x86/compal-laptop.c | 2 +-
drivers/platform/x86/fujitsu-laptop.c | 6 +++---
drivers/platform/x86/msi-laptop.c | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/platform/x86/compal-laptop.c b/drivers/platform/x86/compal-laptop.c
index 71ff154..dc31a08 100644
--- a/drivers/platform/x86/compal-laptop.c
+++ b/drivers/platform/x86/compal-laptop.c
@@ -190,7 +190,7 @@ static int dmi_check_cb(const struct dmi_system_id *id)
printk(KERN_INFO "compal-laptop: Identified laptop model '%s'.\n",
id->ident);
- return 0;
+ return 1;
}
static struct dmi_system_id __initdata compal_dmi_table[] = {
diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c
index dab1a0e..1859d7f 100644
--- a/drivers/platform/x86/fujitsu-laptop.c
+++ b/drivers/platform/x86/fujitsu-laptop.c
@@ -603,7 +603,7 @@ static int dmi_check_cb_s6410(const struct dmi_system_id *id)
dmi_check_cb_common(id);
fujitsu->keycode1 = KEY_SCREENLOCK; /* "Lock" */
fujitsu->keycode2 = KEY_HELP; /* "Mobility Center" */
- return 0;
+ return 1;
}
static int dmi_check_cb_s6420(const struct dmi_system_id *id)
@@ -611,7 +611,7 @@ static int dmi_check_cb_s6420(const struct dmi_system_id *id)
dmi_check_cb_common(id);
fujitsu->keycode1 = KEY_SCREENLOCK; /* "Lock" */
fujitsu->keycode2 = KEY_HELP; /* "Mobility Center" */
- return 0;
+ return 1;
}
static int dmi_check_cb_p8010(const struct dmi_system_id *id)
@@ -620,7 +620,7 @@ static int dmi_check_cb_p8010(const struct dmi_system_id *id)
fujitsu->keycode1 = KEY_HELP; /* "Support" */
fujitsu->keycode3 = KEY_SWITCHVIDEOMODE; /* "Presentation" */
fujitsu->keycode4 = KEY_WWW; /* "Internet" */
- return 0;
+ return 1;
}
static struct dmi_system_id fujitsu_dmi_table[] = {
diff --git a/drivers/platform/x86/msi-laptop.c b/drivers/platform/x86/msi-laptop.c
index afd762b..c67a74c 100644
--- a/drivers/platform/x86/msi-laptop.c
+++ b/drivers/platform/x86/msi-laptop.c
@@ -434,7 +434,7 @@ static int dmi_check_cb(const struct dmi_system_id *id)
{
printk(KERN_INFO "msi-laptop: Identified laptop model '%s'.\n",
id->ident);
- return 0;
+ return 1;
}
static struct dmi_system_id __initdata msi_dmi_table[] = {
--
1.5.4.3
next reply other threads:[~2010-07-02 9:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-02 9:04 Axel Lin [this message]
2010-07-05 7:12 ` [PATCH] compal-laptop/fujitsu-laptop/msi-laptop: make dmi_check_cb Jonathan Woithe
2010-07-06 2:09 ` Axel Lin
2010-07-06 4:28 ` Jonathan Woithe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1278061453.15256.1.camel@mola \
--to=axel.lin@gmail.com \
--cc=Mario_Limonciello@Dell.com \
--cc=ak@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=cezary.jackiewicz@gmail.com \
--cc=jlee@novell.com \
--cc=jwoithe@physics.adelaide.edu.au \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mjg@redhat.com \
--cc=mmarek@suse.cz \
--cc=mzxreary@0pointer.de \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rpurdie@linux.intel.com \
--cc=stefani@seibold.net \
--cc=tim.gardner@canonical.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).