hc
2024-01-05 071106ecf68c401173c58808b1cf5f68cc50d390
kernel/drivers/mtd/nand/raw/bcm47xxnflash/main.c
....@@ -1,12 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * BCM47XX NAND flash driver
34 *
45 * Copyright (C) 2012 Rafał Miłecki <zajec5@gmail.com>
5
- *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License version 2 as
8
- * published by the Free Software Foundation.
9
- *
106 */
117
128 #include "bcm47xxnflash.h"
....@@ -64,8 +60,12 @@
6460 static int bcm47xxnflash_remove(struct platform_device *pdev)
6561 {
6662 struct bcm47xxnflash *nflash = platform_get_drvdata(pdev);
63
+ struct nand_chip *chip = &nflash->nand_chip;
64
+ int ret;
6765
68
- nand_release(&nflash->nand_chip);
66
+ ret = mtd_device_unregister(nand_to_mtd(chip));
67
+ WARN_ON(ret);
68
+ nand_cleanup(chip);
6969
7070 return 0;
7171 }