]> git.karo-electronics.de Git - linux-beck.git/commitdiff
mtd: nand: omap2: show parent device structure in sysfs
authorFrans Klaver <fransklaver@gmail.com>
Wed, 10 Jun 2015 20:38:57 +0000 (22:38 +0200)
committerBrian Norris <computersforpeace@gmail.com>
Tue, 13 Oct 2015 19:56:41 +0000 (12:56 -0700)
Make sure the device structure is properly shown in sysfs by properly
filling in dev.parent.

While at it, make use of the default owner and name values set by
mtdcore.

Signed-off-by: Frans Klaver <fransklaver@gmail.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/nand/omap2.c

index 60fa89939c24861e487354d033fb6c2b8d95eeaf..7fbf00962709386848d92112bf8290c8212af665 100644 (file)
@@ -1684,8 +1684,7 @@ static int omap_nand_probe(struct platform_device *pdev)
        info->ecc_opt           = pdata->ecc_opt;
        mtd                     = &info->mtd;
        mtd->priv               = &info->nand;
-       mtd->name               = dev_name(&pdev->dev);
-       mtd->owner              = THIS_MODULE;
+       mtd->dev.parent         = &pdev->dev;
        nand_chip               = &info->nand;
        nand_chip->ecc.priv     = NULL;