Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934001AbbFJUmt (ORCPT ); Wed, 10 Jun 2015 16:42:49 -0400 Received: from mail-wi0-f193.google.com ([209.85.212.193]:34163 "EHLO mail-wi0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965211AbbFJUkK (ORCPT ); Wed, 10 Jun 2015 16:40:10 -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 56/60] mtd: onenand: generic: show parent device in sysfs Date: Wed, 10 Jun 2015 22:39:10 +0200 Message-Id: <1433968754-10651-57-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: 1121 Lines: 33 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 --- drivers/mtd/onenand/generic.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/mtd/onenand/generic.c b/drivers/mtd/onenand/generic.c index 32a216d..9ed801b 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; -- 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/