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

Commit 4c9539a3 authored by Boris Brezillon's avatar Boris Brezillon Committed by Greg Kroah-Hartman
Browse files

mtd: rawnand: Pass a nand_chip object to nand_scan()



[ Upstream commit 00ad378f304a091ab2e2df5f944892a6ed558610 ]

Let's make the raw NAND API consistent by patching all helpers to take
a nand_chip object instead of an mtd_info one.

We start with nand_scan().

Signed-off-by: default avatarBoris Brezillon <boris.brezillon@bootlin.com>
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent e1906ca1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -246,7 +246,7 @@ necessary information about the device.
        this->eccmode = NAND_ECC_SOFT;

        /* Scan to find existence of the device */
        if (nand_scan (board_mtd, 1)) {
        if (nand_scan (this, 1)) {
            err = -ENXIO;
            goto out_ior;
        }
+1 −1
Original line number Diff line number Diff line
@@ -235,7 +235,7 @@ static int ams_delta_init(struct platform_device *pdev)
		goto out_gpio;

	/* Scan to find existence of the device */
	err = nand_scan(ams_delta_mtd, 1);
	err = nand_scan(this, 1);
	if (err)
		goto out_mtd;

+1 −1
Original line number Diff line number Diff line
@@ -1694,7 +1694,7 @@ atmel_nand_controller_add_nand(struct atmel_nand_controller *nc,

	nc->caps->ops->nand_init(nc, nand);

	ret = nand_scan(mtd, nand->numcs);
	ret = nand_scan(chip, nand->numcs);
	if (ret) {
		dev_err(nc->dev, "NAND scan failed: %d\n", ret);
		return ret;
+1 −1
Original line number Diff line number Diff line
@@ -466,7 +466,7 @@ static int au1550nd_probe(struct platform_device *pdev)
	this->write_buf = (pd->devwidth) ? au_write_buf16 : au_write_buf;
	this->read_buf = (pd->devwidth) ? au_read_buf16 : au_read_buf;

	ret = nand_scan(mtd, 1);
	ret = nand_scan(this, 1);
	if (ret) {
		dev_err(&pdev->dev, "NAND scan failed with %d\n", ret);
		goto out3;
+1 −1
Original line number Diff line number Diff line
@@ -423,7 +423,7 @@ int bcm47xxnflash_ops_bcm4706_init(struct bcm47xxnflash *b47n)
			(w4 << 24 | w3 << 18 | w2 << 12 | w1 << 6 | w0));

	/* Scan NAND */
	err = nand_scan(nand_to_mtd(&b47n->nand_chip), 1);
	err = nand_scan(&b47n->nand_chip, 1);
	if (err) {
		pr_err("Could not scan NAND flash: %d\n", err);
		goto exit;
Loading