linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: Chunhe Lan <Chunhe.Lan@freescale.com>
Cc: dwmw2@infradead.org, kumar.gala@freescale.com,
	linux-mtd@lists.infradead.org, akpm@linux-foundation.org,
	linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] mtd/physmap_of: Don't add disabled flash devices
Date: Tue, 16 Aug 2011 16:44:56 -0500	[thread overview]
Message-ID: <4E4AE4D8.1080903@freescale.com> (raw)
In-Reply-To: <1313486750-15211-1-git-send-email-Chunhe.Lan@freescale.com>

On 08/16/2011 04:25 AM, Chunhe Lan wrote:
> Flash(cfi-flash, jedec-flash, and so on) nodes with the
> property status="disabled" are not usable and so avoid
> adding "disabled" flash devices with the system.
> 
> Signed-off-by: Chunhe Lan <Chunhe.Lan@freescale.com>
> ---
>  drivers/mtd/maps/physmap_of.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/mtd/maps/physmap_of.c b/drivers/mtd/maps/physmap_of.c
> index d251d1d..812e6dc 100644
> --- a/drivers/mtd/maps/physmap_of.c
> +++ b/drivers/mtd/maps/physmap_of.c
> @@ -219,6 +219,9 @@ static int __devinit of_flash_probe(struct platform_device *dev)
>  	struct mtd_info **mtd_list = NULL;
>  	resource_size_t res_size;
>  
> +	if (!of_device_is_available(dp))
> +		return -ENODEV;
> +
>  	match = of_match_device(of_flash_match, &dev->dev);
>  	if (!match)
>  		return -EINVAL;

Are you actually seeing unavailable devices get probed?  I thought the
upper layers were supposed to prevent that.

-Scott

  reply	other threads:[~2011-08-16 21:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-16  9:25 [PATCH] mtd/physmap_of: Don't add disabled flash devices Chunhe Lan
2011-08-16 21:44 ` Scott Wood [this message]
2011-08-22 10:02   ` Lan Chunhe

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=4E4AE4D8.1080903@freescale.com \
    --to=scottwood@freescale.com \
    --cc=Chunhe.Lan@freescale.com \
    --cc=akpm@linux-foundation.org \
    --cc=dwmw2@infradead.org \
    --cc=kumar.gala@freescale.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linuxppc-dev@ozlabs.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 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).