mtd: lpddr: show parent device in sysfs
authorFrans Klaver <fransklaver@gmail.com>
Wed, 10 Jun 2015 20:38:23 +0000 (22:38 +0200)
committerBrian Norris <computersforpeace@gmail.com>
Tue, 13 Oct 2015 16:21:17 +0000 (09:21 -0700)
Fix a bug where mtd parent device symlinks aren't shown in sysfs.

Signed-off-by: Frans Klaver <fransklaver@gmail.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/lpddr/lpddr2_nvm.c

index 063cec40d0aeda7ea10b9b7e9f3ac1db3b6ef31e..2342277c9bcb063f3c1c4691ecfe467cac04dfa8 100644 (file)
@@ -460,6 +460,7 @@ static int lpddr2_nvm_probe(struct platform_device *pdev)
 
        /* Populate mtd_info data structure */
        *mtd = (struct mtd_info) {
+               .dev            = { .parent = &pdev->dev },
                .name           = pdev->dev.init_name,
                .type           = MTD_RAM,
                .priv           = map,