mtd: onenand: generic: show parent device in sysfs

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Fri Nov 6 10:59:18 PST 2015


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=fe003bc8311f3797b802361dbb6465e13dd43a7f
Commit:     fe003bc8311f3797b802361dbb6465e13dd43a7f
Parent:     7b679053cd3348fb8efdd07ce39c4e2e2ad46620
Author:     Frans Klaver <fransklaver at gmail.com>
AuthorDate: Wed Jun 10 22:39:10 2015 +0200
Committer:  Brian Norris <computersforpeace at gmail.com>
CommitDate: Tue Oct 13 12:56:37 2015 -0700

    mtd: onenand: generic: show parent device in sysfs
    
    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 at gmail.com>
    Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 drivers/mtd/onenand/generic.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/mtd/onenand/generic.c b/drivers/mtd/onenand/generic.c
index ab7bda0..125da34 100644
--- a/drivers/mtd/onenand/generic.c
+++ b/drivers/mtd/onenand/generic.c
@@ -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;



More information about the linux-mtd-cvs mailing list