phram: fix writebuffersize

This commit is contained in:
sinavir 2024-01-23 13:23:07 +01:00
parent 078390e48f
commit c9bacf6678
2 changed files with 13 additions and 0 deletions

View file

@ -52,6 +52,7 @@ stdenv.mkDerivation rec {
patches = [
./cmdline-cookie.patch
./phram-fix-missing-writebufsize.patch
./mips-malta-fdt-from-bootloader.patch
] ++ lib.optional (lib.versionOlder version "5.18.0")
./phram-allow-cached-mappings.patch;

View file

@ -0,0 +1,12 @@
diff --git a/drivers/mtd/devices/phram.c b/drivers/mtd/devices/phram.c
index 1bf192f229d7..74f89333a03e 100644
--- a/drivers/mtd/devices/phram.c
+++ b/drivers/mtd/devices/phram.c
@@ -154,6 +154,7 @@ static int register_device(struct platform_device *pdev, const char *name,
new->mtd.type = MTD_RAM;
new->mtd.erasesize = erasesize;
new->mtd.writesize = 1;
+ new->mtd.writebufsize = 1;
mtd_set_of_node(&new->mtd, np);