mtd: devices: spear_smi: show parent device in sysfs

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


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=7d24272253594abcdca8f52758a574367a5912bf
Commit:     7d24272253594abcdca8f52758a574367a5912bf
Parent:     57eea0f5fb221f88c3c9b0ddc967c004bfff7e9c
Author:     Frans Klaver <fransklaver at gmail.com>
AuthorDate: Wed Jun 10 22:38:21 2015 +0200
Committer:  Brian Norris <computersforpeace at gmail.com>
CommitDate: Tue Oct 13 09:21:15 2015 -0700

    mtd: devices: spear_smi: show parent device in sysfs
    
    Fix a bug where mtd parent device symlinks aren't shown in sysfs.
    
    Signed-off-by: Frans Klaver <fransklaver at gmail.com>
    Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 drivers/mtd/devices/spear_smi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mtd/devices/spear_smi.c b/drivers/mtd/devices/spear_smi.c
index 04b24d2..64c7458 100644
--- a/drivers/mtd/devices/spear_smi.c
+++ b/drivers/mtd/devices/spear_smi.c
@@ -854,6 +854,7 @@ static int spear_smi_setup_banks(struct platform_device *pdev,
 	else
 		flash->mtd.name = flash_devices[flash_index].name;
 
+	flash->mtd.dev.parent = &pdev->dev;
 	flash->mtd.type = MTD_NORFLASH;
 	flash->mtd.writesize = 1;
 	flash->mtd.flags = MTD_CAP_NORFLASH;



More information about the linux-mtd-cvs mailing list