diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2017-02-09 11:50:24 +0100 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2017-02-10 04:19:25 +0100 |
commit | 42e9401bd1467d22c4dc4d2c637347b874e6a80b (patch) | |
tree | 580acad041fd8c108c1ae7396817aa77b0584771 /drivers/mtd/mtdpart.c | |
parent | mtd: bcm47xxpart: support layouts with multiple TRX partitions (diff) | |
download | linux-42e9401bd1467d22c4dc4d2c637347b874e6a80b.tar.xz 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/mtdpart.c')
-rw-r--r-- | drivers/mtd/mtdpart.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c index 08925bb68fd6..ea5e5307f667 100644 --- a/drivers/mtd/mtdpart.c +++ b/drivers/mtd/mtdpart.c @@ -432,6 +432,7 @@ static struct mtd_part *allocate_partition(struct mtd_info *master, slave->mtd.dev.parent = IS_ENABLED(CONFIG_MTD_PARTITIONED_MASTER) ? &master->dev : master->dev.parent; + slave->mtd.dev.of_node = part->of_node; slave->mtd._read = part_read; slave->mtd._write = part_write; |