From: Lan Chunhe <b25806@freescale.com>
To: Scott Wood <scottwood@freescale.com>,
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/nand: Don't add disabled nand flash devices
Date: Mon, 22 Aug 2011 18:04:35 +0800 [thread overview]
Message-ID: <op.v0l0xxanz91x4h@localhost.localdomain> (raw)
In-Reply-To: <4E4AE535.4070400@freescale.com>
On Wed, 17 Aug 2011 05:46:29 +0800, Scott Wood <scottwood@freescale.com>
wrote:
> On 08/16/2011 04:27 AM, Chunhe Lan wrote:
>> Nand flash nodes with the property status="disabled" are not
>> usable and so avoid adding "disabled" nand flash devices with
>> the system.
>>
>> Signed-off-by: Chunhe Lan <Chunhe.Lan@freescale.com>
>> ---
>> drivers/mtd/nand/fsl_elbc_nand.c | 5 ++++-
>> 1 files changed, 4 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/mtd/nand/fsl_elbc_nand.c
>> b/drivers/mtd/nand/fsl_elbc_nand.c
>> index 33d8aad..8212c12 100644
>> --- a/drivers/mtd/nand/fsl_elbc_nand.c
>> +++ b/drivers/mtd/nand/fsl_elbc_nand.c
>> @@ -1,6 +1,6 @@
>> /* Freescale Enhanced Local Bus Controller NAND driver
>> *
>> - * Copyright © 2006-2007, 2010 Freescale Semiconductor
>> + * Copyright © 2006-2007, 2010-2011 Freescale Semiconductor
>> *
>> * Authors: Nick Spence <nick.spence@freescale.com>,
>> * Scott Wood <scottwood@freescale.com>
>> @@ -849,6 +849,9 @@ static int __devinit fsl_elbc_nand_probe(struct
>> platform_device *pdev)
>> struct device *dev;
>> struct device_node *node = pdev->dev.of_node;
>>
>> + if (!of_device_is_available(node))
>> + return -ENODEV;
>> +
>> if (!fsl_lbc_ctrl_dev || !fsl_lbc_ctrl_dev->regs)
>> return -ENODEV;
>> lbc = fsl_lbc_ctrl_dev->regs;
>
> Same comment as the other patch -- unavailable devices should already
> not be getting probed. Also, this subject line makes it sound like this
> is a NAND subsystem change rather than a change in one specific driver.
You are right.
The upper layers have prevented unavailable devices.
So, this patch is no need.
Thanks.
-Jack Lan
> -Scott
prev parent reply other threads:[~2011-08-22 10:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-16 9:27 [PATCH] mtd/nand: Don't add disabled nand flash devices Chunhe Lan
2011-08-16 21:46 ` Scott Wood
2011-08-22 10:04 ` Lan Chunhe [this message]
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=op.v0l0xxanz91x4h@localhost.localdomain \
--to=b25806@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 \
--cc=scottwood@freescale.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