You have to use proc_ops
in newer kernels instead of file_operations
, see https://lore.kernel.org/linux-fsdevel/20191225172228.GA13378@avx2/:
static struct proc_ops my_fops={
.proc_open = my_proc_open,
.proc_release = single_release,
.proc_read = seq_read,
.proc_lseek = seq_lseek,
.proc_write = my_proc_write
};