diff options
author | Steven Rostedt <srostedt@redhat.com> | 2009-03-05 21:44:55 -0500 |
---|---|---|
committer | Steven Rostedt <srostedt@redhat.com> | 2009-03-05 21:46:40 -0500 |
commit | 5e2336a0d47c9661a40cc5ef85135ce1406af6e8 (patch) | |
tree | 6d977e4471f8e31245602a26e939368689d2383a /kernel/trace/trace.c | |
parent | 2002c258faaa8f89543df284fdbaa9e4b171547f (diff) |
tracing: make all file_operations const
Impact: cleanup
All file_operations structures should be constant. No one is going to
change them.
Reported-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Diffstat (limited to 'kernel/trace/trace.c')
-rw-r--r-- | kernel/trace/trace.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index c0e9c1263393..e6144acf2b75 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
@@ -1882,14 +1882,14 @@ static int show_traces_open(struct inode *inode, struct file *file) | |||
1882 | return ret; | 1882 | return ret; |
1883 | } | 1883 | } |
1884 | 1884 | ||
1885 | static struct file_operations tracing_fops = { | 1885 | static const struct file_operations tracing_fops = { |
1886 | .open = tracing_open, | 1886 | .open = tracing_open, |
1887 | .read = seq_read, | 1887 | .read = seq_read, |
1888 | .llseek = seq_lseek, | 1888 | .llseek = seq_lseek, |
1889 | .release = tracing_release, | 1889 | .release = tracing_release, |
1890 | }; | 1890 | }; |
1891 | 1891 | ||
1892 | static struct file_operations show_traces_fops = { | 1892 | static const struct file_operations show_traces_fops = { |
1893 | .open = show_traces_open, | 1893 | .open = show_traces_open, |
1894 | .read = seq_read, | 1894 | .read = seq_read, |
1895 | .release = seq_release, | 1895 | .release = seq_release, |
@@ -1982,7 +1982,7 @@ err_unlock: | |||
1982 | return err; | 1982 | return err; |
1983 | } | 1983 | } |
1984 | 1984 | ||
1985 | static struct file_operations tracing_cpumask_fops = { | 1985 | static const struct file_operations tracing_cpumask_fops = { |
1986 | .open = tracing_open_generic, | 1986 | .open = tracing_open_generic, |
1987 | .read = tracing_cpumask_read, | 1987 | .read = tracing_cpumask_read, |
1988 | .write = tracing_cpumask_write, | 1988 | .write = tracing_cpumask_write, |
@@ -2134,7 +2134,7 @@ tracing_trace_options_write(struct file *filp, const char __user *ubuf, | |||
2134 | return cnt; | 2134 | return cnt; |
2135 | } | 2135 | } |
2136 | 2136 | ||
2137 | static struct file_operations tracing_iter_fops = { | 2137 | static const struct file_operations tracing_iter_fops = { |
2138 | .open = tracing_open_generic, | 2138 | .open = tracing_open_generic, |
2139 | .read = tracing_trace_options_read, | 2139 | .read = tracing_trace_options_read, |
2140 | .write = tracing_trace_options_write, | 2140 | .write = tracing_trace_options_write, |
@@ -2167,7 +2167,7 @@ tracing_readme_read(struct file *filp, char __user *ubuf, | |||
2167 | readme_msg, strlen(readme_msg)); | 2167 | readme_msg, strlen(readme_msg)); |
2168 | } | 2168 | } |
2169 | 2169 | ||
2170 | static struct file_operations tracing_readme_fops = { | 2170 | static const struct file_operations tracing_readme_fops = { |
2171 | .open = tracing_open_generic, | 2171 | .open = tracing_open_generic, |
2172 | .read = tracing_readme_read, | 2172 | .read = tracing_readme_read, |
2173 | }; | 2173 | }; |
@@ -2927,25 +2927,25 @@ tracing_mark_write(struct file *filp, const char __user *ubuf, | |||
2927 | return cnt; | 2927 | return cnt; |
2928 | } | 2928 | } |
2929 | 2929 | ||
2930 | static struct file_operations tracing_max_lat_fops = { | 2930 | static const struct file_operations tracing_max_lat_fops = { |
2931 | .open = tracing_open_generic, | 2931 | .open = tracing_open_generic, |
2932 | .read = tracing_max_lat_read, | 2932 | .read = tracing_max_lat_read, |
2933 | .write = tracing_max_lat_write, | 2933 | .write = tracing_max_lat_write, |
2934 | }; | 2934 | }; |
2935 | 2935 | ||
2936 | static struct file_operations tracing_ctrl_fops = { | 2936 | static const struct file_operations tracing_ctrl_fops = { |
2937 | .open = tracing_open_generic, | 2937 | .open = tracing_open_generic, |
2938 | .read = tracing_ctrl_read, | 2938 | .read = tracing_ctrl_read, |
2939 | .write = tracing_ctrl_write, | 2939 | .write = tracing_ctrl_write, |
2940 | }; | 2940 | }; |
2941 | 2941 | ||
2942 | static struct file_operations set_tracer_fops = { | 2942 | static const struct file_operations set_tracer_fops = { |
2943 | .open = tracing_open_generic, | 2943 | .open = tracing_open_generic, |
2944 | .read = tracing_set_trace_read, | 2944 | .read = tracing_set_trace_read, |
2945 | .write = tracing_set_trace_write, | 2945 | .write = tracing_set_trace_write, |
2946 | }; | 2946 | }; |
2947 | 2947 | ||
2948 | static struct file_operations tracing_pipe_fops = { | 2948 | static const struct file_operations tracing_pipe_fops = { |
2949 | .open = tracing_open_pipe, | 2949 | .open = tracing_open_pipe, |
2950 | .poll = tracing_poll_pipe, | 2950 | .poll = tracing_poll_pipe, |
2951 | .read = tracing_read_pipe, | 2951 | .read = tracing_read_pipe, |
@@ -2953,13 +2953,13 @@ static struct file_operations tracing_pipe_fops = { | |||
2953 | .release = tracing_release_pipe, | 2953 | .release = tracing_release_pipe, |
2954 | }; | 2954 | }; |
2955 | 2955 | ||
2956 | static struct file_operations tracing_entries_fops = { | 2956 | static const struct file_operations tracing_entries_fops = { |
2957 | .open = tracing_open_generic, | 2957 | .open = tracing_open_generic, |
2958 | .read = tracing_entries_read, | 2958 | .read = tracing_entries_read, |
2959 | .write = tracing_entries_write, | 2959 | .write = tracing_entries_write, |
2960 | }; | 2960 | }; |
2961 | 2961 | ||
2962 | static struct file_operations tracing_mark_fops = { | 2962 | static const struct file_operations tracing_mark_fops = { |
2963 | .open = tracing_open_generic, | 2963 | .open = tracing_open_generic, |
2964 | .write = tracing_mark_write, | 2964 | .write = tracing_mark_write, |
2965 | }; | 2965 | }; |
@@ -3240,7 +3240,7 @@ tracing_read_dyn_info(struct file *filp, char __user *ubuf, | |||
3240 | return r; | 3240 | return r; |
3241 | } | 3241 | } |
3242 | 3242 | ||
3243 | static struct file_operations tracing_dyn_info_fops = { | 3243 | static const struct file_operations tracing_dyn_info_fops = { |
3244 | .open = tracing_open_generic, | 3244 | .open = tracing_open_generic, |
3245 | .read = tracing_read_dyn_info, | 3245 | .read = tracing_read_dyn_info, |
3246 | }; | 3246 | }; |