]> git.karo-electronics.de Git - linux-beck.git/commitdiff
mtd: onenand: generic: show parent device in sysfs
authorFrans Klaver <fransklaver@gmail.com>
Wed, 10 Jun 2015 20:39:10 +0000 (22:39 +0200)
committerBrian Norris <computersforpeace@gmail.com>
Tue, 13 Oct 2015 19:56:37 +0000 (12:56 -0700)
Fix a bug where mtd parent device symlinks aren't shown in sysfs.

While at it, take advantage 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/onenand/generic.c

index ab7bda0bb245ce4e702f87ebf5136f09920fbf1d..125da34d8ff95746922c5741ed358554b06d9c5d 100644 (file)
@@ -60,9 +60,8 @@ static int generic_onenand_probe(struct platform_device *pdev)
        info->onenand.mmcontrol = pdata ? pdata->mmcontrol : NULL;
        info->onenand.irq = platform_get_irq(pdev, 0);
 
-       info->mtd.name = dev_name(&pdev->dev);
+       info->mtd.dev.parent = &pdev->dev;
        info->mtd.priv = &info->onenand;
-       info->mtd.owner = THIS_MODULE;
 
        if (onenand_scan(&info->mtd, 1)) {
                err = -ENXIO;