mtd: nand: plat_nand: 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=f0aa200ceb4f1bce6826d1c24b5c416a6a8b9faf
Commit:     f0aa200ceb4f1bce6826d1c24b5c416a6a8b9faf
Parent:     84630994fab634baa0250fbd16537f74c8bdbb07
Author:     Frans Klaver <fransklaver at gmail.com>
AuthorDate: Wed Jun 10 22:39:00 2015 +0200
Committer:  Brian Norris <computersforpeace at gmail.com>
CommitDate: Tue Oct 13 12:56:34 2015 -0700

    mtd: nand: plat_nand: show parent device in sysfs
    
    Fix a bug where parent device symlinks aren't shown in sysfs.
    
    While at it, make use of the default owner and name set by mtdcore.
    
    Signed-off-by: Frans Klaver <fransklaver at gmail.com>
    Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 drivers/mtd/nand/plat_nand.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/mtd/nand/plat_nand.c b/drivers/mtd/nand/plat_nand.c
index 717cf62..65b9dbbe 100644
--- a/drivers/mtd/nand/plat_nand.c
+++ b/drivers/mtd/nand/plat_nand.c
@@ -59,8 +59,7 @@ static int plat_nand_probe(struct platform_device *pdev)
 
 	data->chip.priv = &data;
 	data->mtd.priv = &data->chip;
-	data->mtd.owner = THIS_MODULE;
-	data->mtd.name = dev_name(&pdev->dev);
+	data->mtd.dev.parent = &pdev->dev;
 
 	data->chip.IO_ADDR_R = data->io_base;
 	data->chip.IO_ADDR_W = data->io_base;



More information about the linux-mtd-cvs mailing list