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

index 2fb346091af2827b2ae1d238f511f641d00acde2..385305e66fd1c2af4d50f1984a58e7191832be21 100644 (file)
@@ -266,7 +266,7 @@ static int gpio_flash_probe(struct platform_device *pdev)
                kfree(state);
                return -ENXIO;
        }
-
+       state->mtd->dev.parent = &pdev->dev;
 
        mtd_device_parse_register(state->mtd, part_probe_types, NULL,
                                  pdata->parts, pdata->nr_parts);