mtd: rawnand: Stop using nand_release()
This helper is not very useful and very often people get confused: they use nand_release() instead of nand_cleanup(). Now that all drivers have been converted to do not use nand_release() anymore, let's remove this helper. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Cc: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/linux-mtd/20200519130035.1883-63-miquel.raynal@bootlin.com
This commit is contained in:
parent
5724fa7f2e
commit
9630a05525
|
@ -276,8 +276,10 @@ unregisters the partitions in the MTD layer.
|
||||||
#ifdef MODULE
|
#ifdef MODULE
|
||||||
static void __exit board_cleanup (void)
|
static void __exit board_cleanup (void)
|
||||||
{
|
{
|
||||||
/* Release resources, unregister device */
|
/* Unregister device */
|
||||||
nand_release (mtd_to_nand(board_mtd));
|
WARN_ON(mtd_device_unregister(board_mtd));
|
||||||
|
/* Release resources */
|
||||||
|
nand_cleanup(mtd_to_nand(board_mtd));
|
||||||
|
|
||||||
/* unmap physical address */
|
/* unmap physical address */
|
||||||
iounmap(baseaddr);
|
iounmap(baseaddr);
|
||||||
|
|
|
@ -6178,18 +6178,6 @@ void nand_cleanup(struct nand_chip *chip)
|
||||||
|
|
||||||
EXPORT_SYMBOL_GPL(nand_cleanup);
|
EXPORT_SYMBOL_GPL(nand_cleanup);
|
||||||
|
|
||||||
/**
|
|
||||||
* nand_release - [NAND Interface] Unregister the MTD device and free resources
|
|
||||||
* held by the NAND device
|
|
||||||
* @chip: NAND chip object
|
|
||||||
*/
|
|
||||||
void nand_release(struct nand_chip *chip)
|
|
||||||
{
|
|
||||||
mtd_device_unregister(nand_to_mtd(chip));
|
|
||||||
nand_cleanup(chip);
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL_GPL(nand_release);
|
|
||||||
|
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
MODULE_AUTHOR("Steven J. Hill <sjhill@realitydiluted.com>");
|
MODULE_AUTHOR("Steven J. Hill <sjhill@realitydiluted.com>");
|
||||||
MODULE_AUTHOR("Thomas Gleixner <tglx@linutronix.de>");
|
MODULE_AUTHOR("Thomas Gleixner <tglx@linutronix.de>");
|
||||||
|
|
|
@ -98,7 +98,7 @@ struct nand_bbt_descr {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Flag set by nand_create_default_bbt_descr(), marking that the nand_bbt_descr
|
* Flag set by nand_create_default_bbt_descr(), marking that the nand_bbt_descr
|
||||||
* was allocated dynamicaly and must be freed in nand_release(). Has no meaning
|
* was allocated dynamicaly and must be freed in nand_cleanup(). Has no meaning
|
||||||
* in nand_chip.bbt_options.
|
* in nand_chip.bbt_options.
|
||||||
*/
|
*/
|
||||||
#define NAND_BBT_DYNAMICSTRUCT 0x80000000
|
#define NAND_BBT_DYNAMICSTRUCT 0x80000000
|
||||||
|
|
|
@ -1398,8 +1398,6 @@ void nand_wait_ready(struct nand_chip *chip);
|
||||||
* sucessful nand_scan().
|
* sucessful nand_scan().
|
||||||
*/
|
*/
|
||||||
void nand_cleanup(struct nand_chip *chip);
|
void nand_cleanup(struct nand_chip *chip);
|
||||||
/* Unregister the MTD device and calls nand_cleanup() */
|
|
||||||
void nand_release(struct nand_chip *chip);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* External helper for controller drivers that have to implement the WAITRDY
|
* External helper for controller drivers that have to implement the WAITRDY
|
||||||
|
|
Loading…
Reference in New Issue