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>
#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