mtd: maps: pxa2xx-flash: show parent device in sysfs
authorFrans Klaver <fransklaver@gmail.com>
Wed, 10 Jun 2015 20:38:33 +0000 (22:38 +0200)
committerBrian Norris <computersforpeace@gmail.com>
Tue, 13 Oct 2015 19:56:23 +0000 (12:56 -0700)
Fix a bug where mtd 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/maps/pxa2xx-flash.c

index 5ff6cc5b48442423fa3688a03dd765614d95247e..7497090e990029fdf6b2161f4d2eb378abf2c540 100644 (file)
@@ -93,7 +93,7 @@ static int pxa2xx_flash_probe(struct platform_device *pdev)
                        iounmap(info->map.cached);
                return -EIO;
        }
-       info->mtd->owner = THIS_MODULE;
+       info->mtd->dev.parent = &pdev->dev;
 
        mtd_device_parse_register(info->mtd, probes, NULL, flash->parts,
                                  flash->nr_parts);