mtd: powernv_flash: Fix device registration error
[linux-2.6-block.git] / drivers / mtd / devices / powernv_flash.c
index 33593122e49b89646387d7c278ffc96ee1a593d9..83f88b8b5d9f04d02cfed1361493612d8f9d5af2 100644 (file)
@@ -212,7 +212,7 @@ static int powernv_flash_set_driver_info(struct device *dev,
         * Going to have to check what details I need to set and how to
         * get them
         */
-       mtd->name = of_get_property(dev->of_node, "name", NULL);
+       mtd->name = devm_kasprintf(dev, GFP_KERNEL, "%pOFP", dev->of_node);
        mtd->type = MTD_NORFLASH;
        mtd->flags = MTD_WRITEABLE;
        mtd->size = size;