staging: mt29f_spinand: show parent device in sysfs
authorFrans Klaver <fransklaver@gmail.com>
Wed, 10 Jun 2015 20:39:14 +0000 (22:39 +0200)
committerBrian Norris <computersforpeace@gmail.com>
Tue, 13 Oct 2015 19:56:44 +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>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/staging/mt29f_spinand/mt29f_spinand.c

index ad30ce4206ef404241ab3a5a4f12994036f11321..9a8ddbb0191fb8939602d8ed3a879ca685edabed 100644 (file)
@@ -912,8 +912,7 @@ static int spinand_probe(struct spi_device *spi_nand)
        dev_set_drvdata(&spi_nand->dev, mtd);
 
        mtd->priv = chip;
-       mtd->name = dev_name(&spi_nand->dev);
-       mtd->owner = THIS_MODULE;
+       mtd->dev.parent = &spi_nand->dev;
        mtd->oobsize = 64;
 
        if (nand_scan(mtd, 1))