[PATCH 1/3] of: partition: set device_node of the newly created partition

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



So that we can find the devicenode for a partition.

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux