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>
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
#include <linux/fscache-cache.h>
|
||||
#include <trace/events/fscache.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/seq_file.h>
|
||||
|
||||
#define FSCACHE_MIN_THREADS 4
|
||||
#define FSCACHE_MAX_THREADS 32
|
||||
@@ -84,7 +85,7 @@ static inline void fscache_hist(atomic_t histogram[], unsigned long start_jif)
|
||||
atomic_inc(&histogram[jif]);
|
||||
}
|
||||
|
||||
extern const struct file_operations fscache_histogram_fops;
|
||||
extern const struct seq_operations fscache_histogram_ops;
|
||||
|
||||
#else
|
||||
#define fscache_hist(hist, start_jif) do {} while (0)
|
||||
|
Reference in New Issue
Block a user