diff options
author | Frans Klaver <fransklaver@gmail.com> | 2015-06-10 22:39:10 +0200 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2015-10-13 12:56:37 -0700 |
commit | fe003bc8311f3797b802361dbb6465e13dd43a7f (patch) | |
tree | efc9ed561a376e12288c7bfa7296f8a48088259c /drivers/mtd | |
parent | 7b679053cd3348fb8efdd07ce39c4e2e2ad46620 (diff) | |
download | op-kernel-dev-fe003bc8311f3797b802361dbb6465e13dd43a7f.zip op-kernel-dev-fe003bc8311f3797b802361dbb6465e13dd43a7f.tar.gz |
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: Frans Klaver <fransklaver@gmail.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/onenand/generic.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mtd/onenand/generic.c b/drivers/mtd/onenand/generic.c index ab7bda0..125da34 100644 --- a/drivers/mtd/onenand/generic.c +++ b/drivers/mtd/onenand/generic.c @@ -60,9 +60,8 @@ static int generic_onenand_probe(struct platform_device *pdev) info->onenand.mmcontrol = pdata ? pdata->mmcontrol : NULL; 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.owner = THIS_MODULE; if (onenand_scan(&info->mtd, 1)) { err = -ENXIO; |