summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ofpart.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2017-02-09 11:50:24 +0100
committerBrian Norris <computersforpeace@gmail.com>2017-02-09 19:19:25 -0800
commit42e9401bd1467d22c4dc4d2c637347b874e6a80b (patch)
tree580acad041fd8c108c1ae7396817aa77b0584771 /drivers/mtd/ofpart.c
parent89a0d9a9f1941a086a82bc7cd73d275cec98ba14 (diff)
downloadblackbird-obmc-linux-42e9401bd1467d22c4dc4d2c637347b874e6a80b.tar.gz
blackbird-obmc-linux-42e9401bd1467d22c4dc4d2c637347b874e6a80b.zip
mtd: Add partition device node to mtd partition devices
The user visible change here is that mtd partitions get an of_node link in sysfs. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'drivers/mtd/ofpart.c')
-rw-r--r--drivers/mtd/ofpart.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mtd/ofpart.c b/drivers/mtd/ofpart.c
index ede407d6e106..464470122493 100644
--- a/drivers/mtd/ofpart.c
+++ b/drivers/mtd/ofpart.c
@@ -108,6 +108,7 @@ static int parse_ofpart_partitions(struct mtd_info *master,
parts[i].offset = of_read_number(reg, a_cells);
parts[i].size = of_read_number(reg + a_cells, s_cells);
+ parts[i].of_node = pp;
partname = of_get_property(pp, "label", &len);
if (!partname)
OpenPOWER on IntegriCloud