Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ba4ed860 authored by Boris Brezillon's avatar Boris Brezillon Committed by Brian Norris
Browse files

staging: mt29f_spinand: use the mtd instance embedded in struct nand_chip



struct nand_chip now embeds an mtd device, use it instead of allocating
a new one.

Signed-off-by: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
parent 2d374394
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -903,9 +903,7 @@ static int spinand_probe(struct spi_device *spi_nand)
	chip->options	|= NAND_CACHEPRG;
	chip->select_chip = spinand_select_chip;

	mtd = devm_kzalloc(&spi_nand->dev, sizeof(struct mtd_info), GFP_KERNEL);
	if (!mtd)
		return -ENOMEM;
	mtd = nand_to_mtd(chip);

	dev_set_drvdata(&spi_nand->dev, mtd);