From: Zhang Rui <rui.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: LKML <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Cc: linux-pm
<linux-pm-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>,
linux-i2c <linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"Len, Brown" <lenb-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
"Rafael J. Wysocki" <rjw-KKrjLPT3xs0@public.gmane.org>,
Grant Likely
<grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>,
Dirk Brandewie
<dirk.brandewie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
"Zhang, Rui" <rui.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Subject: [RFC PATCH 2/6] Introduce ACPI style match in platform_match
Date: Fri, 28 Sep 2012 15:39:15 +0800 [thread overview]
Message-ID: <1348817955.10877.322.camel@rui.sh.intel.com> (raw)
>From 5d7ecd12c2994b8c5905d52718c2870c3b62746e Mon Sep 17 00:00:00 2001
From: Zhang Rui <rui.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Date: Fri, 28 Sep 2012 14:51:03 +0800
Subject: [RFC PATCH 2/6] Introduce ACPI style match in platform_match
Signed-off-by: Zhang Rui <rui.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
drivers/base/platform.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index a1a7225..90e64c6f 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -20,6 +20,7 @@
#include <linux/err.h>
#include <linux/slab.h>
#include <linux/pm_runtime.h>
+#include <linux/acpi.h>
#include "base.h"
@@ -635,6 +636,13 @@ static const struct platform_device_id *platform_match_id(
struct platform_device *pdev)
{
while (id->name[0]) {
+#ifdef CONFIG_ACPI
+ /* attempt ACPI style match */
+ if (acpi_match_device_id(&pdev->dev, id->name) == 0) {
+ pdev->id_entry = id;
+ return id;
+ }
+#endif
if (strcmp(pdev->name, id->name) == 0) {
pdev->id_entry = id;
return id;
--
1.7.7.6
WARNING: multiple messages have this Message-ID (diff)
From: Zhang Rui <rui.zhang@intel.com>
To: LKML <linux-kernel@vger.kernel.org>
Cc: linux-pm <linux-pm@lists.linux-foundation.org>,
linux-i2c <linux-i2c@vger.kernel.org>,
"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
"Len, Brown" <lenb@kernel.org>, "Rafael J. Wysocki" <rjw@sisk.pl>,
Grant Likely <grant.likely@secretlab.ca>,
Dirk Brandewie <dirk.brandewie@gmail.com>,
"Zhang, Rui" <rui.zhang@intel.com>
Subject: [RFC PATCH 2/6] Introduce ACPI style match in platform_match
Date: Fri, 28 Sep 2012 15:39:15 +0800 [thread overview]
Message-ID: <1348817955.10877.322.camel@rui.sh.intel.com> (raw)
>From 5d7ecd12c2994b8c5905d52718c2870c3b62746e Mon Sep 17 00:00:00 2001
From: Zhang Rui <rui.zhang@intel.com>
Date: Fri, 28 Sep 2012 14:51:03 +0800
Subject: [RFC PATCH 2/6] Introduce ACPI style match in platform_match
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
---
drivers/base/platform.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index a1a7225..90e64c6f 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -20,6 +20,7 @@
#include <linux/err.h>
#include <linux/slab.h>
#include <linux/pm_runtime.h>
+#include <linux/acpi.h>
#include "base.h"
@@ -635,6 +636,13 @@ static const struct platform_device_id *platform_match_id(
struct platform_device *pdev)
{
while (id->name[0]) {
+#ifdef CONFIG_ACPI
+ /* attempt ACPI style match */
+ if (acpi_match_device_id(&pdev->dev, id->name) == 0) {
+ pdev->id_entry = id;
+ return id;
+ }
+#endif
if (strcmp(pdev->name, id->name) == 0) {
pdev->id_entry = id;
return id;
--
1.7.7.6
next reply other threads:[~2012-09-28 7:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-28 7:39 Zhang Rui [this message]
2012-09-28 7:39 ` [RFC PATCH 2/6] Introduce ACPI style match in platform_match Zhang Rui
2012-10-01 6:47 ` Mika Westerberg
2012-10-01 14:00 ` Zhang, Rui
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=1348817955.10877.322.camel@rui.sh.intel.com \
--to=rui.zhang-ral2jqcrhueavxtiumwx3w@public.gmane.org \
--cc=dirk.brandewie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org \
--cc=lenb-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-pm-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=rjw-KKrjLPT3xs0@public.gmane.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.