OSDN Git Service

mtd: powernv_flash: set of_node in mtd's dev
authorRafał Miłecki <rafal@milecki.pl>
Fri, 13 Jul 2018 08:15:59 +0000 (10:15 +0200)
committerBoris Brezillon <boris.brezillon@bootlin.com>
Wed, 18 Jul 2018 14:31:24 +0000 (16:31 +0200)
This enables some features implemented in mtd subsystem like reading
label and partitioning info from DT.

Reported-by: Timothy Pearson <tpearson@raptorengineering.com>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
drivers/mtd/devices/powernv_flash.c

index c1312b1..3359312 100644 (file)
@@ -223,6 +223,7 @@ static int powernv_flash_set_driver_info(struct device *dev,
        mtd->_read = powernv_flash_read;
        mtd->_write = powernv_flash_write;
        mtd->dev.parent = dev;
+       mtd_set_of_node(mtd, dev->of_node);
        return 0;
 }