diff options
author | Christoph Hellwig <hch@lst.de> | 2018-04-13 13:44:18 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2018-05-16 01:23:35 -0400 |
commit | fddda2b7b521185f3aa018f9559eb33b0aee53a9 (patch) | |
tree | ece18b3d82822f8eaefd8b0afa2f93307e83b253 /net/ax25/ax25_route.c | |
parent | 7aed53d1dfd14d468e065212ce45068e2b50c1fa (diff) |
proc: introduce proc_create_seq{,_data}
Variants of proc_create{,_data} that directly take a struct seq_operations
argument and drastically reduces the boilerplate code in the callers.
All trivial callers converted over.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'net/ax25/ax25_route.c')
-rw-r--r-- | net/ax25/ax25_route.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/net/ax25/ax25_route.c b/net/ax25/ax25_route.c index 525558972fd9..a0eff323af12 100644 --- a/net/ax25/ax25_route.c +++ b/net/ax25/ax25_route.c | |||
@@ -323,25 +323,12 @@ static int ax25_rt_seq_show(struct seq_file *seq, void *v) | |||
323 | return 0; | 323 | return 0; |
324 | } | 324 | } |
325 | 325 | ||
326 | static const struct seq_operations ax25_rt_seqops = { | 326 | const struct seq_operations ax25_rt_seqops = { |
327 | .start = ax25_rt_seq_start, | 327 | .start = ax25_rt_seq_start, |
328 | .next = ax25_rt_seq_next, | 328 | .next = ax25_rt_seq_next, |
329 | .stop = ax25_rt_seq_stop, | 329 | .stop = ax25_rt_seq_stop, |
330 | .show = ax25_rt_seq_show, | 330 | .show = ax25_rt_seq_show, |
331 | }; | 331 | }; |
332 | |||
333 | static int ax25_rt_info_open(struct inode *inode, struct file *file) | ||
334 | { | ||
335 | return seq_open(file, &ax25_rt_seqops); | ||
336 | } | ||
337 | |||
338 | const struct file_operations ax25_route_fops = { | ||
339 | .open = ax25_rt_info_open, | ||
340 | .read = seq_read, | ||
341 | .llseek = seq_lseek, | ||
342 | .release = seq_release, | ||
343 | }; | ||
344 | |||
345 | #endif | 332 | #endif |
346 | 333 | ||
347 | /* | 334 | /* |