mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00: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
@@ -210,13 +210,12 @@ out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static const struct file_operations pnpbios_proc_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = pnpbios_proc_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
.release = single_release,
|
||||
.write = pnpbios_proc_write,
|
||||
static const struct proc_ops pnpbios_proc_ops = {
|
||||
.proc_open = pnpbios_proc_open,
|
||||
.proc_read = seq_read,
|
||||
.proc_lseek = seq_lseek,
|
||||
.proc_release = single_release,
|
||||
.proc_write = pnpbios_proc_write,
|
||||
};
|
||||
|
||||
int pnpbios_interface_attach_device(struct pnp_bios_node *node)
|
||||
@@ -228,13 +227,13 @@ int pnpbios_interface_attach_device(struct pnp_bios_node *node)
|
||||
if (!proc_pnp)
|
||||
return -EIO;
|
||||
if (!pnpbios_dont_use_current_config) {
|
||||
proc_create_data(name, 0644, proc_pnp, &pnpbios_proc_fops,
|
||||
proc_create_data(name, 0644, proc_pnp, &pnpbios_proc_ops,
|
||||
(void *)(long)(node->handle));
|
||||
}
|
||||
|
||||
if (!proc_pnp_boot)
|
||||
return -EIO;
|
||||
if (proc_create_data(name, 0644, proc_pnp_boot, &pnpbios_proc_fops,
|
||||
if (proc_create_data(name, 0644, proc_pnp_boot, &pnpbios_proc_ops,
|
||||
(void *)(long)(node->handle + 0x100)))
|
||||
return 0;
|
||||
return -EIO;
|
||||
|
||||
Reference in New Issue
Block a user