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
@@ -152,13 +152,12 @@ static int scanlog_release(struct inode * inode, struct file * file)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct file_operations scanlog_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.read = scanlog_read,
|
||||
.write = scanlog_write,
|
||||
.open = scanlog_open,
|
||||
.release = scanlog_release,
|
||||
.llseek = noop_llseek,
|
||||
static const struct proc_ops scanlog_proc_ops = {
|
||||
.proc_read = scanlog_read,
|
||||
.proc_write = scanlog_write,
|
||||
.proc_open = scanlog_open,
|
||||
.proc_release = scanlog_release,
|
||||
.proc_lseek = noop_llseek,
|
||||
};
|
||||
|
||||
static int __init scanlog_init(void)
|
||||
@@ -176,7 +175,7 @@ static int __init scanlog_init(void)
|
||||
goto err;
|
||||
|
||||
ent = proc_create("powerpc/rtas/scan-log-dump", 0400, NULL,
|
||||
&scanlog_fops);
|
||||
&scanlog_proc_ops);
|
||||
if (!ent)
|
||||
goto err;
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user