All of lore.kernel.org
 help / color / mirror / Atom feed
From: Axel Lin <axel.lin@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Frederick van der Wyck <fvanderwyck@gmail.com>,
	Matthew Garrett <mjg@redhat.com>,
	platform-driver-x86@vger.kernel.org
Subject: [PATCH] platform-drivers-x86: samsung-q10: make dmi_check_callback return 1
Date: Mon, 18 Jul 2011 16:08:21 +0800	[thread overview]
Message-ID: <1310976501.20944.1.camel@phoenix> (raw)

We only care about if there is any successful match from the dmi 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.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 drivers/platform/x86/samsung-q10.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/platform/x86/samsung-q10.c b/drivers/platform/x86/samsung-q10.c
index 54cf3d6..1e54ae7 100644
--- a/drivers/platform/x86/samsung-q10.c
+++ b/drivers/platform/x86/samsung-q10.c
@@ -127,7 +127,7 @@ static struct platform_device *samsungq10_device;
 static int __init dmi_check_callback(const struct dmi_system_id *id)
 {
 	printk(KERN_INFO KBUILD_MODNAME ": found model '%s'\n", id->ident);
-	return 0;
+	return 1;
 }
 
 static struct dmi_system_id __initdata samsungq10_dmi_table[] = {
-- 
1.7.4.1

             reply	other threads:[~2011-07-18  8:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-18  8:08 Axel Lin [this message]
2011-08-05 19:21 ` [PATCH] platform-drivers-x86: samsung-q10: make dmi_check_callback return 1 Matthew Garrett

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=1310976501.20944.1.camel@phoenix \
    --to=axel.lin@gmail.com \
    --cc=fvanderwyck@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mjg@redhat.com \
    --cc=platform-driver-x86@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.