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

index e5d7bcaafa7d165b784827a5e763476e63cc11a4..510c12d41761e96c75cca000a2a2c179d6ef4a62 100644 (file)
@@ -1316,7 +1316,7 @@ static int __init probe_docg4(struct platform_device *pdev)
        doc = (struct docg4_priv *) (nand + 1);
        mtd->priv = nand;
        nand->priv = doc;
-       mtd->owner = THIS_MODULE;
+       mtd->dev.parent = &pdev->dev;
        doc->virtadr = virtadr;
        doc->dev = dev;