lkml.org 
[lkml]   [2016]   [Jan]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH for-4.4] mtd: fix cmdlinepart parser, early naming for auto-filled MTD
On Fri, Dec 11, 2015 at 03:58:01PM -0800, Brian Norris wrote:
> Commit 807f16d4db95 ("mtd: core: set some defaults when dev.parent is
> set") attempted to provide some default settings for MTDs that
> (a) assign the parent device and
> (b) don't provide their own name or owner
>
> However, this isn't a perfect drop-in replacement for the boilerplate
> found in some drivers, because the MTD name is used by partition
> parsers like cmdlinepart, but the name isn't set until add_mtd_device(),
> after the parsing is completed. This means cmdlinepart sees a NULL name
> and therefore will not work properly.
>
> Fix this by moving the default name and owner assignment to be first in
> the MTD registration process.
>
> Fixes: 807f16d4db95 ("mtd: core: set some defaults when dev.parent is set")
> Reported-by: Heiko Schocher <hs@denx.de>
> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
> Cc: Heiko Schocher <hs@denx.de>
> Cc: Frans Klaver <fransklaver@gmail.com>
> ---
> Heiko, can you provide testing feedback (e.g., 'Tested-by: ...')?

Applied this patch to linux-mtd.git, even though it doesn't completely
fix the reported problem -- it fixes many other MTD drivers, but
drivers/mtd/nand/ has an additional issue. I'll resend the additional
patch that fixes Heiko's problem completely in a bit.

Brian


\
 
 \ /
  Last update: 2016-01-04 20:21    [W:0.086 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site