mtd: nand: bcm47xxnflash: show parent device in sysfs
authorFrans Klaver <fransklaver@gmail.com>
Wed, 10 Jun 2015 20:38:38 +0000 (22:38 +0200)
committerBrian Norris <computersforpeace@gmail.com>
Tue, 13 Oct 2015 19:56:26 +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/bcm47xxnflash/main.c

index 461577cfb5bc64d2d6ccebeea6d79cc3fff11b34..9ba0c0f2cd9bbe1b729cb9afba77ab531fe3703c 100644 (file)
@@ -34,7 +34,7 @@ static int bcm47xxnflash_probe(struct platform_device *pdev)
                return -ENOMEM;
 
        b47n->nand_chip.priv = b47n;
-       b47n->mtd.owner = THIS_MODULE;
+       b47n->mtd.dev.parent = &pdev->dev;
        b47n->mtd.priv = &b47n->nand_chip; /* Required */
        b47n->cc = container_of(nflash, struct bcma_drv_cc, nflash);