From: Frans Klaver Date: Wed, 10 Jun 2015 20:39:10 +0000 (+0200) Subject: mtd: onenand: generic: show parent device in sysfs X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=fe003bc8311f3797b802361dbb6465e13dd43a7f;p=linux-beck.git 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 Signed-off-by: Brian Norris --- diff --git a/drivers/mtd/onenand/generic.c b/drivers/mtd/onenand/generic.c index ab7bda0bb245..125da34d8ff9 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;