]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
UBUNTU: hio -- proc_create() requires a "struct proc_ops" in 5.6
authorAndrea Righi <andrea.righi@canonical.com>
Wed, 12 Feb 2020 09:39:42 +0000 (10:39 +0100)
committerPaolo Pisati <paolo.pisati@canonical.com>
Tue, 2 Nov 2021 07:24:48 +0000 (08:24 +0100)
With d56c0d45f0e27f814e87a1676b6bdccccbc252e9 ("proc: decouple proc from
VFS with "struct proc_ops"") proc_create() requires a "struct proc_ops"
instead of a "struct file_operations". Change the code accordingly.

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
ubuntu/hio/hio.c

index 57ad49a7e5621db9ab377e6e65c3d3dbc41d16b2..b282411095b729ab87f7756af2dac0a94500f7c5 100644 (file)
@@ -2323,12 +2323,21 @@ static int ssd_proc_open(struct inode *inode, struct file *file)
 #endif
 }
 
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0))
 static const struct file_operations ssd_proc_fops = {
        .open           = ssd_proc_open,
        .read           = seq_read,
        .llseek         = seq_lseek,
        .release        = single_release,
 };
+#else
+static const struct proc_ops ssd_proc_fops = {
+       .proc_open      = ssd_proc_open,
+       .proc_read      = seq_read,
+       .proc_lseek     = seq_lseek,
+       .proc_release   = single_release,
+};
+#endif
 #endif