Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965274AbbFJUkR (ORCPT ); Wed, 10 Jun 2015 16:40:17 -0400 Received: from mail-wg0-f67.google.com ([74.125.82.67]:33002 "EHLO mail-wg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964861AbbFJUj4 (ORCPT ); Wed, 10 Jun 2015 16:39:56 -0400 From: Frans Klaver To: Brian Norris Cc: Frans Klaver , David Woodhouse , linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org Subject: [PATCH v2 43/60] mtd: nand: omap2: show parent device structure in sysfs Date: Wed, 10 Jun 2015 22:38:57 +0200 Message-Id: <1433968754-10651-44-git-send-email-fransklaver@gmail.com> X-Mailer: git-send-email 2.4.0 In-Reply-To: <1433968754-10651-1-git-send-email-fransklaver@gmail.com> References: <1433968754-10651-1-git-send-email-fransklaver@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1045 Lines: 33 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 --- drivers/mtd/nand/omap2.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c index 60fa899..7fbf009 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; -- 2.4.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/