From: Frans Klaver Date: Wed, 10 Jun 2015 20:38:57 +0000 (+0200) Subject: mtd: nand: omap2: show parent device structure in sysfs X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=853f1c58c4b2a6f1ec81c335c82d0252b387ab1e;p=linux-beck.git mtd: nand: omap2: show parent device structure in sysfs Make sure the device structure is properly shown in sysfs by properly filling in dev.parent. While at it, make use 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/nand/omap2.c b/drivers/mtd/nand/omap2.c index 60fa89939c24..7fbf00962709 100644 --- a/drivers/mtd/nand/omap2.c +++ b/drivers/mtd/nand/omap2.c @@ -1684,8 +1684,7 @@ static int omap_nand_probe(struct platform_device *pdev) info->ecc_opt = pdata->ecc_opt; mtd = &info->mtd; mtd->priv = &info->nand; - mtd->name = dev_name(&pdev->dev); - mtd->owner = THIS_MODULE; + mtd->dev.parent = &pdev->dev; nand_chip = &info->nand; nand_chip->ecc.priv = NULL;