From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 1/3] of: partition: set device_node of the newly created partition
Date: Mon, 28 Apr 2014 11:31:43 +0200 [thread overview]
Message-ID: <1398677505-15869-1-git-send-email-s.hauer@pengutronix.de> (raw)
So that we can find the devicenode for a partition.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
drivers/of/partition.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/of/partition.c b/drivers/of/partition.c
index 5ed44a8..0560eb3 100644
--- a/drivers/of/partition.c
+++ b/drivers/of/partition.c
@@ -60,6 +60,8 @@ struct cdev *of_parse_partition(struct cdev *cdev, struct device_node *node)
filename = asprintf("%s.%s", cdev->name, partname);
new = devfs_add_partition(cdev->name, offset, size, flags, filename);
+ if (new && new->dev)
+ new->dev->device_node = node;
if (cdev->mtd && cdev->mtd->type == MTD_NANDFLASH)
dev_add_bb_dev(filename, NULL);
--
1.9.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next reply other threads:[~2014-04-28 9:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-28 9:31 Sascha Hauer [this message]
2014-04-28 9:31 ` [PATCH 2/3] of: move of_find_device_by_node_path to drivers/of/of_path.c Sascha Hauer
2014-04-28 9:31 ` [PATCH 3/3] of_path: Allow to specify path with phandle only Sascha Hauer
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=1398677505-15869-1-git-send-email-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.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