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
@@ -282,17 +282,16 @@ static int snd_info_entry_release(struct inode *inode, struct file *file)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct file_operations snd_info_entry_operations =
|
||||
static const struct proc_ops snd_info_entry_operations =
|
||||
{
|
||||
.owner = THIS_MODULE,
|
||||
.llseek = snd_info_entry_llseek,
|
||||
.read = snd_info_entry_read,
|
||||
.write = snd_info_entry_write,
|
||||
.poll = snd_info_entry_poll,
|
||||
.unlocked_ioctl = snd_info_entry_ioctl,
|
||||
.mmap = snd_info_entry_mmap,
|
||||
.open = snd_info_entry_open,
|
||||
.release = snd_info_entry_release,
|
||||
.proc_lseek = snd_info_entry_llseek,
|
||||
.proc_read = snd_info_entry_read,
|
||||
.proc_write = snd_info_entry_write,
|
||||
.proc_poll = snd_info_entry_poll,
|
||||
.proc_ioctl = snd_info_entry_ioctl,
|
||||
.proc_mmap = snd_info_entry_mmap,
|
||||
.proc_open = snd_info_entry_open,
|
||||
.proc_release = snd_info_entry_release,
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -421,14 +420,13 @@ static int snd_info_text_entry_release(struct inode *inode, struct file *file)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct file_operations snd_info_text_entry_ops =
|
||||
static const struct proc_ops snd_info_text_entry_ops =
|
||||
{
|
||||
.owner = THIS_MODULE,
|
||||
.open = snd_info_text_entry_open,
|
||||
.release = snd_info_text_entry_release,
|
||||
.write = snd_info_text_entry_write,
|
||||
.llseek = seq_lseek,
|
||||
.read = seq_read,
|
||||
.proc_open = snd_info_text_entry_open,
|
||||
.proc_release = snd_info_text_entry_release,
|
||||
.proc_write = snd_info_text_entry_write,
|
||||
.proc_lseek = seq_lseek,
|
||||
.proc_read = seq_read,
|
||||
};
|
||||
|
||||
static struct snd_info_entry *create_subdir(struct module *mod,
|
||||
@@ -810,7 +808,7 @@ static int __snd_info_register(struct snd_info_entry *entry)
|
||||
return -ENOMEM;
|
||||
}
|
||||
} else {
|
||||
const struct file_operations *ops;
|
||||
const struct proc_ops *ops;
|
||||
if (entry->content == SNDRV_INFO_CONTENT_DATA)
|
||||
ops = &snd_info_entry_operations;
|
||||
else
|
||||
|
Reference in New Issue
Block a user