Merge tag 'char-misc-6.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
[linux-2.6-microblaze.git] / drivers / char / mem.c
index 8d27aa6..3c6670c 100644 (file)
@@ -628,6 +628,7 @@ static int open_port(struct inode *inode, struct file *filp)
 #define full_lseek      null_lseek
 #define write_zero     write_null
 #define write_iter_zero        write_iter_null
+#define splice_write_zero      splice_write_null
 #define open_mem       open_port
 
 static const struct file_operations __maybe_unused mem_fops = {
@@ -665,6 +666,8 @@ static const struct file_operations zero_fops = {
        .read_iter      = read_iter_zero,
        .read           = read_zero,
        .write_iter     = write_iter_zero,
+       .splice_read    = copy_splice_read,
+       .splice_write   = splice_write_zero,
        .mmap           = mmap_zero,
        .get_unmapped_area = get_unmapped_area_zero,
 #ifndef CONFIG_MMU
@@ -676,6 +679,7 @@ static const struct file_operations full_fops = {
        .llseek         = full_lseek,
        .read_iter      = read_iter_zero,
        .write          = write_full,
+       .splice_read    = copy_splice_read,
 };
 
 static const struct memdev {