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>
This commit is contained in:

committed by
Miquel Raynal

parent
00ad378f30
commit
59ac276f22
@@ -2354,7 +2354,7 @@ static int __init ns_init_module(void)
|
||||
|
||||
err_exit:
|
||||
free_nandsim(nand);
|
||||
nand_release(nsmtd);
|
||||
nand_release(chip);
|
||||
for (i = 0;i < ARRAY_SIZE(nand->partitions); ++i)
|
||||
kfree(nand->partitions[i].name);
|
||||
error:
|
||||
@@ -2376,7 +2376,7 @@ static void __exit ns_cleanup_module(void)
|
||||
int i;
|
||||
|
||||
free_nandsim(ns); /* Free nandsim private resources */
|
||||
nand_release(nsmtd); /* Unregister driver */
|
||||
nand_release(chip); /* Unregister driver */
|
||||
for (i = 0;i < ARRAY_SIZE(ns->partitions); ++i)
|
||||
kfree(ns->partitions[i].name);
|
||||
kfree(mtd_to_nand(nsmtd)); /* Free other structures */
|
||||
|
Reference in New Issue
Block a user