diff mbox series

mtd: rawnand: xway: Fix build issue

Message ID 20200626065511.16424-1-miquel.raynal@bootlin.com
State Accepted
Headers show
Series mtd: rawnand: xway: Fix build issue | expand

Commit Message

Miquel Raynal June 26, 2020, 6:55 a.m. UTC
This MIPS driver does not support COMPILE_TEST yet and failed to build
under my radar.

Replace 'mtd' chich is not defined in the scope of xway_nand_remove()
by nand_to_mtd(chip). The mistake has been added in the long series
dropping nand_release().

Tested with a 7.3.0 MIPS GCC toolchain built with Buildroot.

Fixes: 9fdd78f7bcda ("mtd: rawnand: xway: Stop using nand_release()")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
 drivers/mtd/nand/raw/xway_nand.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Miquel Raynal July 7, 2020, 7:05 p.m. UTC | #1
On Fri, 2020-06-26 at 06:55:11 UTC, Miquel Raynal wrote:
> This MIPS driver does not support COMPILE_TEST yet and failed to build
> under my radar.
> 
> Replace 'mtd' chich is not defined in the scope of xway_nand_remove()
> by nand_to_mtd(chip). The mistake has been added in the long series
> dropping nand_release().
> 
> Tested with a 7.3.0 MIPS GCC toolchain built with Buildroot.
> 
> Fixes: 9fdd78f7bcda ("mtd: rawnand: xway: Stop using nand_release()")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/fixes.

Miquel
diff mbox series

Patch

diff --git a/drivers/mtd/nand/raw/xway_nand.c b/drivers/mtd/nand/raw/xway_nand.c
index 94bfba994326..29255476afdb 100644
--- a/drivers/mtd/nand/raw/xway_nand.c
+++ b/drivers/mtd/nand/raw/xway_nand.c
@@ -224,7 +224,7 @@  static int xway_nand_remove(struct platform_device *pdev)
 	struct nand_chip *chip = &data->chip;
 	int ret;
 
-	ret = mtd_device_unregister(mtd);
+	ret = mtd_device_unregister(nand_to_mtd(chip));
 	WARN_ON(ret);
 	nand_cleanup(chip);