mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-20 14:13:16 +00:00
659f4a13dd
With Linux 6.1 many of our downstream patches and out-of-tree files can be removed or at least replaced by backported upstream commits. Signed-off-by: Daniel Golle <daniel@makrotopia.org> [fix CMDLINE_OVERRIDE for arm64] Signed-off-by: Bjørn Mork <bjorn@mork.no>
35 lines
808 B
Diff
35 lines
808 B
Diff
--- a/drivers/mtd/nand/spi/core.c
|
|
+++ b/drivers/mtd/nand/spi/core.c
|
|
@@ -19,6 +19,7 @@
|
|
#include <linux/string.h>
|
|
#include <linux/spi/spi.h>
|
|
#include <linux/spi/spi-mem.h>
|
|
+#include <linux/mtd/mtk_bmt.h>
|
|
|
|
static int spinand_read_reg_op(struct spinand_device *spinand, u8 reg, u8 *val)
|
|
{
|
|
@@ -1344,6 +1345,7 @@ static int spinand_probe(struct spi_mem
|
|
if (ret)
|
|
return ret;
|
|
|
|
+ mtk_bmt_attach(mtd);
|
|
ret = mtd_device_register(mtd, NULL, 0);
|
|
if (ret)
|
|
goto err_spinand_cleanup;
|
|
@@ -1351,6 +1353,7 @@ static int spinand_probe(struct spi_mem
|
|
return 0;
|
|
|
|
err_spinand_cleanup:
|
|
+ mtk_bmt_detach(mtd);
|
|
spinand_cleanup(spinand);
|
|
|
|
return ret;
|
|
@@ -1369,6 +1372,7 @@ static int spinand_remove(struct spi_mem
|
|
if (ret)
|
|
return ret;
|
|
|
|
+ mtk_bmt_detach(mtd);
|
|
spinand_cleanup(spinand);
|
|
|
|
return 0;
|