From: Aaron Sierra <asierra@xes-inc.com>
To: David Woodhouse <dwmw2@infradead.org>,
Brian Norris <computersforpeace@gmail.com>
Cc: linux-mtd@lists.infradead.org,
Prabhakar Kushwaha <prabhakar@freescale.com>
Subject: [PATCH 2/2] mtd: fsl_ifc_nand: Probe partitions OF node
Date: Fri, 15 Aug 2014 19:47:39 -0500 (CDT) [thread overview]
Message-ID: <251532766.70336.1408150059026.JavaMail.zimbra@xes-inc.com> (raw)
In-Reply-To: <2056273149.70335.1408150004992.JavaMail.zimbra@xes-inc.com>
Previously, the OF node defining the IFC NAND controller was being
passed to mtd_device_parse_register(), not the node defining the
partitions. This resulted in no OF-defined partitions being created.
Signed-off-by: Aaron Sierra <asierra@xes-inc.com>
---
drivers/mtd/nand/fsl_ifc_nand.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/mtd/nand/fsl_ifc_nand.c b/drivers/mtd/nand/fsl_ifc_nand.c
index 7861909..9aeb146 100644
--- a/drivers/mtd/nand/fsl_ifc_nand.c
+++ b/drivers/mtd/nand/fsl_ifc_nand.c
@@ -1029,7 +1029,6 @@ static int fsl_ifc_nand_probe(struct platform_device *dev)
struct device_node *node = dev->dev.of_node;
struct mtd_part_parser_data ppdata;
- ppdata.of_node = dev->dev.of_node;
if (!fsl_ifc_ctrl_dev || !fsl_ifc_ctrl_dev->regs)
return -ENODEV;
ifc = fsl_ifc_ctrl_dev->regs;
@@ -1126,9 +1125,13 @@ static int fsl_ifc_nand_probe(struct platform_device *dev)
/* First look for RedBoot table or partitions on the command
* line, these take precedence over device tree information */
+ ppdata.of_node = of_get_next_child(dev->dev.of_node, NULL);
mtd_device_parse_register(&priv->mtd, part_probe_types, &ppdata,
NULL, 0);
+ if (ppdata.of_node)
+ of_node_put(ppdata.of_node);
+
dev_info(priv->dev, "IFC NAND device at 0x%llx, bank %d\n",
(unsigned long long)res.start, priv->bank);
return 0;
--
1.9.1
next prev parent reply other threads:[~2014-08-16 0:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-16 0:46 [PATCH 1/2] mtd: fsl_ifc_nand: Use devm_* throughout driver Aaron Sierra
2014-08-16 0:47 ` Aaron Sierra [this message]
2014-08-20 23:26 ` [PATCH 2/2] mtd: fsl_ifc_nand: Probe partitions OF node Scott Wood
2014-08-20 23:45 ` Aaron Sierra
2014-08-20 23:59 ` Scott Wood
2014-08-21 0:15 ` Aaron Sierra
2014-08-21 0:17 ` Scott Wood
2014-09-28 0:19 ` [PATCH 1/2] mtd: fsl_ifc_nand: Use devm_* throughout driver Brian Norris
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=251532766.70336.1408150059026.JavaMail.zimbra@xes-inc.com \
--to=asierra@xes-inc.com \
--cc=computersforpeace@gmail.com \
--cc=dwmw2@infradead.org \
--cc=linux-mtd@lists.infradead.org \
--cc=prabhakar@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