All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Zhang Rui <rui.zhang@intel.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	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>
Subject: Re: [RFC PATCH 2/6] Introduce ACPI style match in platform_match
Date: Mon, 1 Oct 2012 09:47:09 +0300	[thread overview]
Message-ID: <20121001064709.GG15548@intel.com> (raw)
In-Reply-To: <1348817955.10877.322.camel@rui.sh.intel.com>

On Fri, Sep 28, 2012 at 03:39:15PM +0800, Zhang Rui wrote:
> >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

I don't think the above is needed as you stub the acpi_match_device_id()
out when !CONFIG_ACPI.

How about I2C and SPI slave devices?

> +		/* 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
> 
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

  reply	other threads:[~2012-10-01  6:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-28  7:39 [RFC PATCH 2/6] Introduce ACPI style match in platform_match Zhang Rui
2012-09-28  7:39 ` Zhang Rui
2012-10-01  6:47 ` Mika Westerberg [this message]
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=20121001064709.GG15548@intel.com \
    --to=mika.westerberg@linux.intel.com \
    --cc=dirk.brandewie@gmail.com \
    --cc=grant.likely@secretlab.ca \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=rjw@sisk.pl \
    --cc=rui.zhang@intel.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 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.