mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 04:33:26 +02:00
proc: convert everything to "struct proc_ops"
The most notable change is DEFINE_SHOW_ATTRIBUTE macro split in seq_file.h. Conversion rule is: llseek => proc_lseek unlocked_ioctl => proc_ioctl xxx => proc_xxx delete ".owner = THIS_MODULE" line [akpm@linux-foundation.org: fix drivers/isdn/capi/kcapi_proc.c] [sfr@canb.auug.org.au: fix kernel/sched/psi.c] Link: http://lkml.kernel.org/r/20200122180545.36222f50@canb.auug.org.au Link: http://lkml.kernel.org/r/20191225172546.GB13378@avx2 Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
d56c0d45f0
commit
97a32539b9
@@ -157,11 +157,11 @@ static int exports_proc_open(struct inode *inode, struct file *file)
|
||||
return exports_net_open(current->nsproxy->net_ns, file);
|
||||
}
|
||||
|
||||
static const struct file_operations exports_proc_operations = {
|
||||
.open = exports_proc_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
.release = seq_release,
|
||||
static const struct proc_ops exports_proc_ops = {
|
||||
.proc_open = exports_proc_open,
|
||||
.proc_read = seq_read,
|
||||
.proc_lseek = seq_lseek,
|
||||
.proc_release = seq_release,
|
||||
};
|
||||
|
||||
static int exports_nfsd_open(struct inode *inode, struct file *file)
|
||||
@@ -1431,8 +1431,7 @@ static int create_proc_exports_entry(void)
|
||||
entry = proc_mkdir("fs/nfs", NULL);
|
||||
if (!entry)
|
||||
return -ENOMEM;
|
||||
entry = proc_create("exports", 0, entry,
|
||||
&exports_proc_operations);
|
||||
entry = proc_create("exports", 0, entry, &exports_proc_ops);
|
||||
if (!entry) {
|
||||
remove_proc_entry("fs/nfs", NULL);
|
||||
return -ENOMEM;
|
||||
|
Reference in New Issue
Block a user