mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
proc: introduce proc_create_single{,_data}
Variants of proc_create{,_data} that directly take a seq_file show
callback and drastically reduces the boilerplate code in the callers.
All trivial callers converted over.
Signed-off-by: Christoph Hellwig <[email protected]>
This commit is contained in:
parent
44414d82cf
commit
3f3942aca6
85 changed files with 235 additions and 1509 deletions
14
kernel/dma.c
14
kernel/dma.c
|
|
@ -135,21 +135,9 @@ static int proc_dma_show(struct seq_file *m, void *v)
|
|||
}
|
||||
#endif /* MAX_DMA_CHANNELS */
|
||||
|
||||
static int proc_dma_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, proc_dma_show, NULL);
|
||||
}
|
||||
|
||||
static const struct file_operations proc_dma_operations = {
|
||||
.open = proc_dma_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
.release = single_release,
|
||||
};
|
||||
|
||||
static int __init proc_dma_init(void)
|
||||
{
|
||||
proc_create("dma", 0, NULL, &proc_dma_operations);
|
||||
proc_create_single("dma", 0, NULL, proc_dma_show);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue