9
0
Fork 0

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>
This commit is contained in:
Sascha Hauer 2014-04-09 15:12:30 +02:00
parent 0af79fbb67
commit 601dcf7644
1 changed files with 2 additions and 0 deletions

View File

@ -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);