diff --git a/tr.c b/tr.c index 93a13c8..2dcde87 100644 --- a/tr.c +++ b/tr.c @@ -581,12 +581,11 @@ static int rif_seq_open(struct inode *inode, struct file *file) return seq_open(file, &rif_seq_ops); } -static const struct file_operations rif_seq_fops = { - .owner = THIS_MODULE, - .open = rif_seq_open, - .read = seq_read, - .llseek = seq_lseek, - .release = seq_release, +static const struct proc_ops rif_seq_fops = { + .proc_open = rif_seq_open, + .proc_read = seq_read, + .proc_lseek = seq_lseek, + .proc_release = seq_release, }; #endif @@ -664,7 +663,7 @@ static int __init rif_init(void) #ifdef CONFIG_SYSCTL register_sysctl_paths(tr_path, tr_table); #endif - proc_net_fops_create(&init_net, "tr_rif", S_IRUGO, &rif_seq_fops); + proc_create("tr_rif", S_IRUGO, init_net.proc_net, &rif_seq_fops); return 0; }