mtd: devices: sst251: show parent device in sysfs

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


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

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

diff --git a/drivers/mtd/devices/sst25l.c b/drivers/mtd/devices/sst25l.c
index c63ecbc..3928014 100644
--- a/drivers/mtd/devices/sst25l.c
+++ b/drivers/mtd/devices/sst25l.c
@@ -374,9 +374,8 @@ static int sst25l_probe(struct spi_device *spi)
 	data = dev_get_platdata(&spi->dev);
 	if (data && data->name)
 		flash->mtd.name = data->name;
-	else
-		flash->mtd.name = dev_name(&spi->dev);
 
+	flash->mtd.dev.parent   = &spi->dev;
 	flash->mtd.type		= MTD_NORFLASH;
 	flash->mtd.flags	= MTD_CAP_NORFLASH;
 	flash->mtd.erasesize	= flash_info->erase_size;



More information about the linux-mtd-cvs mailing list