[PATCH] mtd: jz4780_nand: remove useless mtd->priv = chip assignment

Boris Brezillon boris.brezillon at free-electrons.com
Thu Jan 7 11:32:47 PST 2016


On Thu,  7 Jan 2016 10:02:59 -0800
Brian Norris <computersforpeace at gmail.com> wrote:

> As of commit 2d3b77bac34b ("mtd: nand: update mtd_to_nand()"), this
> assignment isn't necessary, since struct mtd_info is embedded in struct
> nand_chip.
> 
> Signed-off-by: Brian Norris <computersforpeace at gmail.com>
> Cc: Harvey Hunt <harvey.hunt at imgtec.com>
> Cc: Boris Brezillon <boris.brezillon at free-electrons.com>
> Cc: Alex Smith <alex at alex-smith.me.uk>

Reviewed-by: Boris Brezillon <boris.brezillon at free-electrons.com>

> ---
>  drivers/mtd/nand/jz4780_nand.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/mtd/nand/jz4780_nand.c b/drivers/mtd/nand/jz4780_nand.c
> index 17eb9f264187..6156c554e1c2 100644
> --- a/drivers/mtd/nand/jz4780_nand.c
> +++ b/drivers/mtd/nand/jz4780_nand.c
> @@ -270,7 +270,6 @@ static int jz4780_nand_init_chip(struct platform_device *pdev,
>  
>  	chip = &nand->chip;
>  	mtd = nand_to_mtd(chip);
> -	mtd->priv = chip;
>  	mtd->name = devm_kasprintf(dev, GFP_KERNEL, "%s.%d", dev_name(dev),
>  				   cs->bank);
>  	if (!mtd->name)



-- 
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com



More information about the linux-mtd mailing list