From patchwork Tue Mar 3 21:40:27 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frans Klaver X-Patchwork-Id: 445947 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:1868:205::9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 9BB09140172 for ; Wed, 4 Mar 2015 09:13:11 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="verification failed; unprotected key" header.d=gmail.com header.i=@gmail.com header.b=NevHXLxv; dkim-adsp=none (unprotected policy); dkim-atps=neutral Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YSv2n-0001xx-5m; Tue, 03 Mar 2015 22:12:01 +0000 Received: from casper.infradead.org ([2001:770:15f::2]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YSux2-0004u2-El for linux-mtd@bombadil.infradead.org; Tue, 03 Mar 2015 22:06:04 +0000 Received: from mail-wi0-x234.google.com ([2a00:1450:400c:c05::234]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YSuaP-00078O-JD for linux-mtd@lists.infradead.org; Tue, 03 Mar 2015 21:42:42 +0000 Received: by widem10 with SMTP id em10so26272315wid.1 for ; Tue, 03 Mar 2015 13:42:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=0fsEFRH3Hm/4kETwu5Q4TyhdXEoRxRhVUM1LTV3WwNE=; b=NevHXLxvF1+YpiHBySINJkrK3s4kKazdb+54o16iL2rRsnQmUSzsFasFaT1eOJa+IE V5emHAxI634lmnV7VJ9uIyiWMfpiL2K1jkQqolHfOckEyb0itbR8DgH4nw5rTszsDhpE WOGZ1ASGWwL5wM3uu8T8biiuSZ5s7QyGy8EBcGOKUHdtbx9eQkgSUG+5J7aLHnFZ8KHI 4ZxlYtPuTixX5cA08PylDrrxK2ebSQvvuZTzGmPtw3UOLpjZZcnIhAKzGfwS2MYh2OBc s8nY49/Rarjc8CM6IhcwEG1IG9wH2Lwb5Z6oKl88d6i93icyHoTxXfeV4qbWdMTOU9hH 6oZw== X-Received: by 10.180.78.202 with SMTP id d10mr49648395wix.25.1425418940048; Tue, 03 Mar 2015 13:42:20 -0800 (PST) Received: from localhost.localdomain (82-171-48-45.ip.telfort.nl. [82.171.48.45]) by mx.google.com with ESMTPSA id dz6sm1256495wib.0.2015.03.03.13.42.19 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 03 Mar 2015 13:42:19 -0800 (PST) From: Frans Klaver To: Brian Norris Subject: [PATCH 43/60] mtd: nand: omap2: show device structure in sysfs Date: Tue, 3 Mar 2015 22:40:27 +0100 Message-Id: <1425418844-25177-44-git-send-email-fransklaver@gmail.com> X-Mailer: git-send-email 2.2.2 In-Reply-To: <1425418844-25177-1-git-send-email-fransklaver@gmail.com> References: <1425418844-25177-1-git-send-email-fransklaver@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150303_214241_662746_6A8464DA X-CRM114-Status: GOOD ( 11.34 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on casper.infradead.org summary: Content analysis details: (-2.7 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:400c:c05:0:0:0:234 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (fransklaver[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain Cc: linux-mtd@lists.infradead.org, Frans Klaver , David Woodhouse , linux-kernel@vger.kernel.org X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org 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;