* [PATCH] mtd/nand: Don't add disabled nand flash devices
@ 2011-08-16 9:27 Chunhe Lan
2011-08-16 21:46 ` Scott Wood
0 siblings, 1 reply; 3+ messages in thread
From: Chunhe Lan @ 2011-08-16 9:27 UTC (permalink / raw)
To: linux-mtd; +Cc: kumar.gala, linuxppc-dev, scottwood, akpm, dwmw2, Chunhe Lan
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;
--
1.5.6.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mtd/nand: Don't add disabled nand flash devices
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
0 siblings, 1 reply; 3+ messages in thread
From: Scott Wood @ 2011-08-16 21:46 UTC (permalink / raw)
To: Chunhe Lan; +Cc: dwmw2, kumar.gala, linux-mtd, akpm, linuxppc-dev
On 08/16/2011 04:27 AM, Chunhe Lan wrote:
> Nand flash nodes with the property status=3D"disabled" are not
> usable and so avoid adding "disabled" nand flash devices with
> the system.
>=20
> Signed-off-by: Chunhe Lan <Chunhe.Lan@freescale.com>
> ---
> drivers/mtd/nand/fsl_elbc_nand.c | 5 ++++-
> 1 files changed, 4 insertions(+), 1 deletions(-)
>=20
> diff --git a/drivers/mtd/nand/fsl_elbc_nand.c b/drivers/mtd/nand/fsl_el=
bc_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 =C2=A9 2006-2007, 2010 Freescale Semiconductor
> + * Copyright =C2=A9 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 pla=
tform_device *pdev)
> struct device *dev;
> struct device_node *node =3D pdev->dev.of_node;
> =20
> + if (!of_device_is_available(node))
> + return -ENODEV;
> +
> if (!fsl_lbc_ctrl_dev || !fsl_lbc_ctrl_dev->regs)
> return -ENODEV;
> lbc =3D 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.
-Scott
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mtd/nand: Don't add disabled nand flash devices
2011-08-16 21:46 ` Scott Wood
@ 2011-08-22 10:04 ` Lan Chunhe
0 siblings, 0 replies; 3+ messages in thread
From: Lan Chunhe @ 2011-08-22 10:04 UTC (permalink / raw)
To: Scott Wood, Chunhe Lan; +Cc: dwmw2, kumar.gala, linux-mtd, akpm, linuxppc-dev
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=3D"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 =C2=A9 2006-2007, 2010 Freescale Semiconductor
>> + * Copyright =C2=A9 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 =3D 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 =3D 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 th=
is
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-08-22 10:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).