mtd: nand: atmel_nand: show parent device in sysfs
authorFrans Klaver <fransklaver@gmail.com>
Wed, 10 Jun 2015 20:38:36 +0000 (22:38 +0200)
committerBrian Norris <computersforpeace@gmail.com>
Tue, 13 Oct 2015 19:56:25 +0000 (12:56 -0700)
Fix a bug where 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@gmail.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/nand/atmel_nand.c

index 46010bd895b152598d44b9a47004c42de374a678..89894737871329ed0cd78111b8d9aa7f81317c7a 100644 (file)
@@ -2126,7 +2126,7 @@ static int atmel_nand_probe(struct platform_device *pdev)
 
        nand_chip->priv = host;         /* link the private data structures */
        mtd->priv = nand_chip;
-       mtd->owner = THIS_MODULE;
+       mtd->dev.parent = &pdev->dev;
 
        /* Set address of NAND IO lines */
        nand_chip->IO_ADDR_R = host->io_base;