From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757461AbbCCVlp (ORCPT ); Tue, 3 Mar 2015 16:41:45 -0500 Received: from mail-we0-f170.google.com ([74.125.82.170]:34110 "EHLO mail-we0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756028AbbCCVll (ORCPT ); Tue, 3 Mar 2015 16:41:41 -0500 From: Frans Klaver To: Brian Norris Cc: Frans Klaver , David Woodhouse , linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org Subject: [PATCH 01/60] mtd: core: tone down suggestion that dev.parent should be set Date: Tue, 3 Mar 2015 22:39:45 +0100 Message-Id: <1425418844-25177-2-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> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org add_mtd_device() has a comment suggesting that the caller should have set dev.parent. This is required to have the device show up in sysfs, but not for proper operation of the mtd device itself. Currently we have five drivers registering mtd devices during module initialization, so they don't actually provide a parent device to link to. That means we cannot WARN_ON() here, as it would trigger false positives. Make the comment a bit less firm in its assertion that dev.parent should be set. Signed-off-by: Frans Klaver --- drivers/mtd/mtdcore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c index 11883bd..2093676 100644 --- a/drivers/mtd/mtdcore.c +++ b/drivers/mtd/mtdcore.c @@ -422,7 +422,7 @@ int add_mtd_device(struct mtd_info *mtd) } /* Caller should have set dev.parent to match the - * physical device. + * physical device, if appropriate. */ mtd->dev.type = &mtd_devtype; mtd->dev.class = &mtd_class; -- 2.2.2