Skip to contentSkip to conversation

mtd: jz4780_nand: remove useless mtd->priv = chip assignment

PATCH In review Brian Norris 2 participants 3 messages Jan 7, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mtd: jz4780_nand: remove useless mtd->priv = chip assignment

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.

Cc Harvey Hunt <[email protected]>
Cc Boris Brezillon <[email protected]>
Cc Alex Smith <[email protected]>
---
 drivers/mtd/nand/jz4780_nand.c | 1 -
 1 file changed, 1 deletion(-)
drivers/mtd/nand/jz4780_nand.c +0 -1
index 17eb9f264187..6156c554e1c2 100644
@@ -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)
Signature · 1 line
2.6.0.rc2.230.g3dd15c0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · On Thu, 7 Jan 2016 10:02:59 -0800 Brian Norris <[email protected]>…

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.

Cc Harvey Hunt <[email protected]>
Cc Boris Brezillon <[email protected]>
Cc Alex Smith <[email protected]>
Quoted 16 lines
---
 drivers/mtd/nand/jz4780_nand.c | 1 -
 1 file changed, 1 deletion(-)
drivers/mtd/nand/jz4780_nand.c +0 -1
index 17eb9f264187..6156c554e1c2 100644
@@ -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)
Signature · 3 lines
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
author Applied
#2 lore raw
Quoted 7 lines · Boris Brezillon
Quoted 4 lines · On Thu, 7 Jan 2016 10:02:59 -0800 Brian Norris <[email protected]>…

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.

Quoted 6 lines
Quoted 4 lines
Cc Harvey Hunt <[email protected]>
Cc Boris Brezillon <[email protected]>
Cc Alex Smith <[email protected]>

Thanks! Applied to l2-mtd.git