summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2014-04-09 15:12:30 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2014-04-28 10:20:10 +0200
commit601dcf7644814a3c9dc2a332bbd065d94d133edd (patch)
tree8116c4b8296ca7ebb4e55782b6704a5a2307e1de /drivers
parent0af79fbb6779921d3f1962773adb7fb57d3c89d4 (diff)
downloadbarebox-601dcf7644814a3c9dc2a332bbd065d94d133edd.tar.gz
barebox-601dcf7644814a3c9dc2a332bbd065d94d133edd.tar.xz
of: partition: set device_node of the newly created partition
So that we can find the devicenode for a partition. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/of/partition.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/of/partition.c b/drivers/of/partition.c
index 5ed44a84d2..0560eb3af9 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);