[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150309230250.GA13266@ld-irv-0074>
Date: Mon, 9 Mar 2015 16:14:38 -0700
From: Brian Norris <computersforpeace@...il.com>
To: Frans Klaver <fransklaver@...il.com>
Cc: David Woodhouse <dwmw2@...radead.org>,
linux-kernel@...r.kernel.org, linux-mtd@...ts.infradead.org
Subject: Re: [PATCH 01/60] mtd: core: tone down suggestion that dev.parent
should be set
On Tue, Mar 03, 2015 at 10:39:45PM +0100, Frans Klaver wrote:
> 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,
What do you mean "have the device show up in sysfs"? AFAICT, this only
has bearing on whether the *parent* device shows up as a sysfs symlink
within the MTD device directory. i.e.:
/sys/class/mtd/mtd*/device
For instance, this sort of symlink:
/sys/class/mtd/mtd0/device -> ../../../f03e2800.nand
It might be good to clarify this in the commit message, since you make
the problem sound worse than (I think) it is.
Brian
> 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 <fransklaver@...il.com>
> ---
> 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
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists