Openwrt/target/linux/generic/pending-5.10/498-mtd-mtdconcat-select-readwrite-function.patch
Felix Fietkau b10d604459 kernel: add linux 5.10 support
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-02-16 20:06:51 +01:00

25 lines
819 B
Diff

--- a/drivers/mtd/mtdconcat.c
+++ b/drivers/mtd/mtdconcat.c
@@ -683,8 +683,12 @@ struct mtd_info *mtd_concat_create(struc
concat->mtd._writev = concat_writev;
if (subdev[0]->_read_oob)
concat->mtd._read_oob = concat_read_oob;
+ else
+ concat->mtd._read = concat_read;
if (subdev[0]->_write_oob)
concat->mtd._write_oob = concat_write_oob;
+ else
+ concat->mtd._write = concat_write;
if (subdev[0]->_block_isbad)
concat->mtd._block_isbad = concat_block_isbad;
if (subdev[0]->_block_markbad)
@@ -744,8 +748,6 @@ struct mtd_info *mtd_concat_create(struc
concat->mtd.name = name;
concat->mtd._erase = concat_erase;
- concat->mtd._read = concat_read;
- concat->mtd._write = concat_write;
concat->mtd._sync = concat_sync;
concat->mtd._lock = concat_lock;
concat->mtd._unlock = concat_unlock;