[PATCH v3 6/6] mtd: partitions: support a cleanup callback for parsers

Brian Norris computersforpeace at gmail.com
Wed Dec 9 15:00:55 PST 2015


On Wed, Dec 09, 2015 at 10:46:50PM +0100, Boris Brezillon wrote:
> On Wed, 9 Dec 2015 10:24:03 -0800
> Brian Norris <computersforpeace at gmail.com> wrote:
> 
> > If partition parsers need to clean up their resources, we shouldn't
> > assume that all memory will fit in a single kmalloc() that the caller
> > can kfree(). We should allow the parser to provide a proper cleanup
> > routine.
> > 
> > Note that this means we need to keep a hold on the parser's module for a
> > bit longer, and release it later with mtd_part_parser_put().
> > 
> > Alongside this, define a default callback that we'll automatically use
> > if the parser doesn't provide one, so we can still retain the old
> > behavior.
> > 
> > Signed-off-by: Brian Norris <computersforpeace at gmail.com>
> 
> Reviewed-by: Boris Brezillon <boris.brezillon at free-electrons.com>

Applied, thanks!



More information about the linux-mtd mailing list