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

index 45948e8f5fb03b5cbf9ca7bc056a3079a4f58787..9e4fd0f59d3bb0554ec9006cd56de9841c2bf6ba 100644 (file)
@@ -1017,7 +1017,7 @@ static int __init fsmc_nand_probe(struct platform_device *pdev)
        mtd->priv = nand;
        nand->priv = host;
 
-       host->mtd.owner = THIS_MODULE;
+       host->mtd.dev.parent = &pdev->dev;
        nand->IO_ADDR_R = host->data_va;
        nand->IO_ADDR_W = host->data_va;
        nand->cmd_ctrl = fsmc_cmd_ctrl;