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

index 5a7551aa2d8906a0e89ef4bf30465004c3d5c531..18ee361455a20189f3b497a0cd6c0ac0c3dc47a0 100644 (file)
@@ -96,7 +96,7 @@ static int rbtx4939_flash_probe(struct platform_device *dev)
                err = -ENXIO;
                goto err_out;
        }
-       info->mtd->owner = THIS_MODULE;
+       info->mtd.dev.parent = &dev->dev;
        err = mtd_device_parse_register(info->mtd, NULL, NULL, pdata->parts,
                                        pdata->nr_parts);