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
@@ -159,12 +159,12 @@ static int poweron_open(struct inode *inode, struct file *file)
|
||||
return single_open(file, ppc_rtas_poweron_show, NULL);
|
||||
}
|
||||
|
||||
static const struct file_operations ppc_rtas_poweron_operations = {
|
||||
.open = poweron_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
.write = ppc_rtas_poweron_write,
|
||||
.release = single_release,
|
||||
static const struct proc_ops ppc_rtas_poweron_proc_ops = {
|
||||
.proc_open = poweron_open,
|
||||
.proc_read = seq_read,
|
||||
.proc_lseek = seq_lseek,
|
||||
.proc_write = ppc_rtas_poweron_write,
|
||||
.proc_release = single_release,
|
||||
};
|
||||
|
||||
static int progress_open(struct inode *inode, struct file *file)
|
||||
@@ -172,12 +172,12 @@ static int progress_open(struct inode *inode, struct file *file)
|
||||
return single_open(file, ppc_rtas_progress_show, NULL);
|
||||
}
|
||||
|
||||
static const struct file_operations ppc_rtas_progress_operations = {
|
||||
.open = progress_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
.write = ppc_rtas_progress_write,
|
||||
.release = single_release,
|
||||
static const struct proc_ops ppc_rtas_progress_proc_ops = {
|
||||
.proc_open = progress_open,
|
||||
.proc_read = seq_read,
|
||||
.proc_lseek = seq_lseek,
|
||||
.proc_write = ppc_rtas_progress_write,
|
||||
.proc_release = single_release,
|
||||
};
|
||||
|
||||
static int clock_open(struct inode *inode, struct file *file)
|
||||
@@ -185,12 +185,12 @@ static int clock_open(struct inode *inode, struct file *file)
|
||||
return single_open(file, ppc_rtas_clock_show, NULL);
|
||||
}
|
||||
|
||||
static const struct file_operations ppc_rtas_clock_operations = {
|
||||
.open = clock_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
.write = ppc_rtas_clock_write,
|
||||
.release = single_release,
|
||||
static const struct proc_ops ppc_rtas_clock_proc_ops = {
|
||||
.proc_open = clock_open,
|
||||
.proc_read = seq_read,
|
||||
.proc_lseek = seq_lseek,
|
||||
.proc_write = ppc_rtas_clock_write,
|
||||
.proc_release = single_release,
|
||||
};
|
||||
|
||||
static int tone_freq_open(struct inode *inode, struct file *file)
|
||||
@@ -198,12 +198,12 @@ static int tone_freq_open(struct inode *inode, struct file *file)
|
||||
return single_open(file, ppc_rtas_tone_freq_show, NULL);
|
||||
}
|
||||
|
||||
static const struct file_operations ppc_rtas_tone_freq_operations = {
|
||||
.open = tone_freq_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
.write = ppc_rtas_tone_freq_write,
|
||||
.release = single_release,
|
||||
static const struct proc_ops ppc_rtas_tone_freq_proc_ops = {
|
||||
.proc_open = tone_freq_open,
|
||||
.proc_read = seq_read,
|
||||
.proc_lseek = seq_lseek,
|
||||
.proc_write = ppc_rtas_tone_freq_write,
|
||||
.proc_release = single_release,
|
||||
};
|
||||
|
||||
static int tone_volume_open(struct inode *inode, struct file *file)
|
||||
@@ -211,12 +211,12 @@ static int tone_volume_open(struct inode *inode, struct file *file)
|
||||
return single_open(file, ppc_rtas_tone_volume_show, NULL);
|
||||
}
|
||||
|
||||
static const struct file_operations ppc_rtas_tone_volume_operations = {
|
||||
.open = tone_volume_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
.write = ppc_rtas_tone_volume_write,
|
||||
.release = single_release,
|
||||
static const struct proc_ops ppc_rtas_tone_volume_proc_ops = {
|
||||
.proc_open = tone_volume_open,
|
||||
.proc_read = seq_read,
|
||||
.proc_lseek = seq_lseek,
|
||||
.proc_write = ppc_rtas_tone_volume_write,
|
||||
.proc_release = single_release,
|
||||
};
|
||||
|
||||
static int ppc_rtas_find_all_sensors(void);
|
||||
@@ -238,17 +238,17 @@ static int __init proc_rtas_init(void)
|
||||
return -ENODEV;
|
||||
|
||||
proc_create("powerpc/rtas/progress", 0644, NULL,
|
||||
&ppc_rtas_progress_operations);
|
||||
&ppc_rtas_progress_proc_ops);
|
||||
proc_create("powerpc/rtas/clock", 0644, NULL,
|
||||
&ppc_rtas_clock_operations);
|
||||
&ppc_rtas_clock_proc_ops);
|
||||
proc_create("powerpc/rtas/poweron", 0644, NULL,
|
||||
&ppc_rtas_poweron_operations);
|
||||
&ppc_rtas_poweron_proc_ops);
|
||||
proc_create_single("powerpc/rtas/sensors", 0444, NULL,
|
||||
ppc_rtas_sensors_show);
|
||||
proc_create("powerpc/rtas/frequency", 0644, NULL,
|
||||
&ppc_rtas_tone_freq_operations);
|
||||
&ppc_rtas_tone_freq_proc_ops);
|
||||
proc_create("powerpc/rtas/volume", 0644, NULL,
|
||||
&ppc_rtas_tone_volume_operations);
|
||||
&ppc_rtas_tone_volume_proc_ops);
|
||||
proc_create_single("powerpc/rtas/rmo_buffer", 0400, NULL,
|
||||
ppc_rtas_rmo_buf_show);
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user