summaryrefslogtreecommitdiff
path: root/drivers/mtd/nand/raw/orion_nand.c
diff options
context:
space:
mode:
authorBoris Brezillon <boris.brezillon@bootlin.com>2018-09-06 15:05:15 +0300
committerMiquel Raynal <miquel.raynal@bootlin.com>2018-10-03 12:12:25 +0300
commit59ac276f22270fb2094910f9a734c17f41c25e70 (patch)
treeca9974cf0daf3a3e926393797d8264badd76e761 /drivers/mtd/nand/raw/orion_nand.c
parent00ad378f304a091ab2e2df5f944892a6ed558610 (diff)
downloadlinux-59ac276f22270fb2094910f9a734c17f41c25e70.tar.xz
mtd: rawnand: Pass a nand_chip object to nand_release()
Let's make the raw NAND API consistent by patching all helpers to take a nand_chip object instead of an mtd_info one. Now is nand_release()'s turn. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Diffstat (limited to 'drivers/mtd/nand/raw/orion_nand.c')
-rw-r--r--drivers/mtd/nand/raw/orion_nand.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/mtd/nand/raw/orion_nand.c b/drivers/mtd/nand/raw/orion_nand.c
index 256a6b018bdc..5c58d91ffaee 100644
--- a/drivers/mtd/nand/raw/orion_nand.c
+++ b/drivers/mtd/nand/raw/orion_nand.c
@@ -181,7 +181,7 @@ static int __init orion_nand_probe(struct platform_device *pdev)
mtd->name = "orion_nand";
ret = mtd_device_register(mtd, board->parts, board->nr_parts);
if (ret) {
- nand_release(mtd);
+ nand_release(nc);
goto no_dev;
}
@@ -196,9 +196,8 @@ static int orion_nand_remove(struct platform_device *pdev)
{
struct orion_nand_info *info = platform_get_drvdata(pdev);
struct nand_chip *chip = &info->chip;
- struct mtd_info *mtd = nand_to_mtd(chip);
- nand_release(mtd);
+ nand_release(chip);
clk_disable_unprepare(info->clk);