Commit fe003bc8 authored by Frans Klaver's avatar Frans Klaver Committed by Brian Norris

mtd: onenand: generic: show parent device in sysfs

Fix a bug where mtd parent device symlinks aren't shown in sysfs.

While at it, take advantage of the default owner and name values set by
mtdcore.
Signed-off-by: default avatarFrans Klaver <fransklaver@gmail.com>
Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
parent 7b679053
...@@ -60,9 +60,8 @@ static int generic_onenand_probe(struct platform_device *pdev) ...@@ -60,9 +60,8 @@ static int generic_onenand_probe(struct platform_device *pdev)
info->onenand.mmcontrol = pdata ? pdata->mmcontrol : NULL; info->onenand.mmcontrol = pdata ? pdata->mmcontrol : NULL;
info->onenand.irq = platform_get_irq(pdev, 0); info->onenand.irq = platform_get_irq(pdev, 0);
info->mtd.name = dev_name(&pdev->dev); info->mtd.dev.parent = &pdev->dev;
info->mtd.priv = &info->onenand; info->mtd.priv = &info->onenand;
info->mtd.owner = THIS_MODULE;
if (onenand_scan(&info->mtd, 1)) { if (onenand_scan(&info->mtd, 1)) {
err = -ENXIO; err = -ENXIO;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment