diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2009-10-01 18:43:56 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-10-01 19:11:11 -0400 |
commit | 828c09509b9695271bcbdc53e9fc9a6a737148d2 (patch) | |
tree | 072ffad6f02db7bf4095e07e2b90247cfa042998 /kernel | |
parent | 1c4115e595dec42aa0e81ba47ef46e35b34ed428 (diff) |
const: constify remaining file_operations
[akpm@linux-foundation.org: fix KVM]
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/cgroup.c | 10 | ||||
-rw-r--r-- | kernel/kprobes.c | 4 | ||||
-rw-r--r-- | kernel/rcutree_trace.c | 10 | ||||
-rw-r--r-- | kernel/sched.c | 2 | ||||
-rw-r--r-- | kernel/time/timer_list.c | 2 | ||||
-rw-r--r-- | kernel/time/timer_stats.c | 2 |
6 files changed, 15 insertions, 15 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 7ccba4bc5e3b..d2b88596efde 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c | |||
@@ -703,7 +703,7 @@ static int cgroup_mkdir(struct inode *dir, struct dentry *dentry, int mode); | |||
703 | static int cgroup_rmdir(struct inode *unused_dir, struct dentry *dentry); | 703 | static int cgroup_rmdir(struct inode *unused_dir, struct dentry *dentry); |
704 | static int cgroup_populate_dir(struct cgroup *cgrp); | 704 | static int cgroup_populate_dir(struct cgroup *cgrp); |
705 | static const struct inode_operations cgroup_dir_inode_operations; | 705 | static const struct inode_operations cgroup_dir_inode_operations; |
706 | static struct file_operations proc_cgroupstats_operations; | 706 | static const struct file_operations proc_cgroupstats_operations; |
707 | 707 | ||
708 | static struct backing_dev_info cgroup_backing_dev_info = { | 708 | static struct backing_dev_info cgroup_backing_dev_info = { |
709 | .name = "cgroup", | 709 | .name = "cgroup", |
@@ -1863,7 +1863,7 @@ static int cgroup_seqfile_release(struct inode *inode, struct file *file) | |||
1863 | return single_release(inode, file); | 1863 | return single_release(inode, file); |
1864 | } | 1864 | } |
1865 | 1865 | ||
1866 | static struct file_operations cgroup_seqfile_operations = { | 1866 | static const struct file_operations cgroup_seqfile_operations = { |
1867 | .read = seq_read, | 1867 | .read = seq_read, |
1868 | .write = cgroup_file_write, | 1868 | .write = cgroup_file_write, |
1869 | .llseek = seq_lseek, | 1869 | .llseek = seq_lseek, |
@@ -1922,7 +1922,7 @@ static int cgroup_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
1922 | return simple_rename(old_dir, old_dentry, new_dir, new_dentry); | 1922 | return simple_rename(old_dir, old_dentry, new_dir, new_dentry); |
1923 | } | 1923 | } |
1924 | 1924 | ||
1925 | static struct file_operations cgroup_file_operations = { | 1925 | static const struct file_operations cgroup_file_operations = { |
1926 | .read = cgroup_file_read, | 1926 | .read = cgroup_file_read, |
1927 | .write = cgroup_file_write, | 1927 | .write = cgroup_file_write, |
1928 | .llseek = generic_file_llseek, | 1928 | .llseek = generic_file_llseek, |
@@ -3369,7 +3369,7 @@ static int cgroup_open(struct inode *inode, struct file *file) | |||
3369 | return single_open(file, proc_cgroup_show, pid); | 3369 | return single_open(file, proc_cgroup_show, pid); |
3370 | } | 3370 | } |
3371 | 3371 | ||
3372 | struct file_operations proc_cgroup_operations = { | 3372 | const struct file_operations proc_cgroup_operations = { |
3373 | .open = cgroup_open, | 3373 | .open = cgroup_open, |
3374 | .read = seq_read, | 3374 | .read = seq_read, |
3375 | .llseek = seq_lseek, | 3375 | .llseek = seq_lseek, |
@@ -3398,7 +3398,7 @@ static int cgroupstats_open(struct inode *inode, struct file *file) | |||
3398 | return single_open(file, proc_cgroupstats_show, NULL); | 3398 | return single_open(file, proc_cgroupstats_show, NULL); |
3399 | } | 3399 | } |
3400 | 3400 | ||
3401 | static struct file_operations proc_cgroupstats_operations = { | 3401 | static const struct file_operations proc_cgroupstats_operations = { |
3402 | .open = cgroupstats_open, | 3402 | .open = cgroupstats_open, |
3403 | .read = seq_read, | 3403 | .read = seq_read, |
3404 | .llseek = seq_lseek, | 3404 | .llseek = seq_lseek, |
diff --git a/kernel/kprobes.c b/kernel/kprobes.c index cfadc1291d0b..5240d75f4c60 100644 --- a/kernel/kprobes.c +++ b/kernel/kprobes.c | |||
@@ -1333,7 +1333,7 @@ static int __kprobes kprobes_open(struct inode *inode, struct file *filp) | |||
1333 | return seq_open(filp, &kprobes_seq_ops); | 1333 | return seq_open(filp, &kprobes_seq_ops); |
1334 | } | 1334 | } |
1335 | 1335 | ||
1336 | static struct file_operations debugfs_kprobes_operations = { | 1336 | static const struct file_operations debugfs_kprobes_operations = { |
1337 | .open = kprobes_open, | 1337 | .open = kprobes_open, |
1338 | .read = seq_read, | 1338 | .read = seq_read, |
1339 | .llseek = seq_lseek, | 1339 | .llseek = seq_lseek, |
@@ -1515,7 +1515,7 @@ static ssize_t write_enabled_file_bool(struct file *file, | |||
1515 | return count; | 1515 | return count; |
1516 | } | 1516 | } |
1517 | 1517 | ||
1518 | static struct file_operations fops_kp = { | 1518 | static const struct file_operations fops_kp = { |
1519 | .read = read_enabled_file_bool, | 1519 | .read = read_enabled_file_bool, |
1520 | .write = write_enabled_file_bool, | 1520 | .write = write_enabled_file_bool, |
1521 | }; | 1521 | }; |
diff --git a/kernel/rcutree_trace.c b/kernel/rcutree_trace.c index c89f5e9fd173..179e6ad80dc0 100644 --- a/kernel/rcutree_trace.c +++ b/kernel/rcutree_trace.c | |||
@@ -93,7 +93,7 @@ static int rcudata_open(struct inode *inode, struct file *file) | |||
93 | return single_open(file, show_rcudata, NULL); | 93 | return single_open(file, show_rcudata, NULL); |
94 | } | 94 | } |
95 | 95 | ||
96 | static struct file_operations rcudata_fops = { | 96 | static const struct file_operations rcudata_fops = { |
97 | .owner = THIS_MODULE, | 97 | .owner = THIS_MODULE, |
98 | .open = rcudata_open, | 98 | .open = rcudata_open, |
99 | .read = seq_read, | 99 | .read = seq_read, |
@@ -145,7 +145,7 @@ static int rcudata_csv_open(struct inode *inode, struct file *file) | |||
145 | return single_open(file, show_rcudata_csv, NULL); | 145 | return single_open(file, show_rcudata_csv, NULL); |
146 | } | 146 | } |
147 | 147 | ||
148 | static struct file_operations rcudata_csv_fops = { | 148 | static const struct file_operations rcudata_csv_fops = { |
149 | .owner = THIS_MODULE, | 149 | .owner = THIS_MODULE, |
150 | .open = rcudata_csv_open, | 150 | .open = rcudata_csv_open, |
151 | .read = seq_read, | 151 | .read = seq_read, |
@@ -196,7 +196,7 @@ static int rcuhier_open(struct inode *inode, struct file *file) | |||
196 | return single_open(file, show_rcuhier, NULL); | 196 | return single_open(file, show_rcuhier, NULL); |
197 | } | 197 | } |
198 | 198 | ||
199 | static struct file_operations rcuhier_fops = { | 199 | static const struct file_operations rcuhier_fops = { |
200 | .owner = THIS_MODULE, | 200 | .owner = THIS_MODULE, |
201 | .open = rcuhier_open, | 201 | .open = rcuhier_open, |
202 | .read = seq_read, | 202 | .read = seq_read, |
@@ -222,7 +222,7 @@ static int rcugp_open(struct inode *inode, struct file *file) | |||
222 | return single_open(file, show_rcugp, NULL); | 222 | return single_open(file, show_rcugp, NULL); |
223 | } | 223 | } |
224 | 224 | ||
225 | static struct file_operations rcugp_fops = { | 225 | static const struct file_operations rcugp_fops = { |
226 | .owner = THIS_MODULE, | 226 | .owner = THIS_MODULE, |
227 | .open = rcugp_open, | 227 | .open = rcugp_open, |
228 | .read = seq_read, | 228 | .read = seq_read, |
@@ -276,7 +276,7 @@ static int rcu_pending_open(struct inode *inode, struct file *file) | |||
276 | return single_open(file, show_rcu_pending, NULL); | 276 | return single_open(file, show_rcu_pending, NULL); |
277 | } | 277 | } |
278 | 278 | ||
279 | static struct file_operations rcu_pending_fops = { | 279 | static const struct file_operations rcu_pending_fops = { |
280 | .owner = THIS_MODULE, | 280 | .owner = THIS_MODULE, |
281 | .open = rcu_pending_open, | 281 | .open = rcu_pending_open, |
282 | .read = seq_read, | 282 | .read = seq_read, |
diff --git a/kernel/sched.c b/kernel/sched.c index ee61f454a98b..1535f3884b88 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -780,7 +780,7 @@ static int sched_feat_open(struct inode *inode, struct file *filp) | |||
780 | return single_open(filp, sched_feat_show, NULL); | 780 | return single_open(filp, sched_feat_show, NULL); |
781 | } | 781 | } |
782 | 782 | ||
783 | static struct file_operations sched_feat_fops = { | 783 | static const struct file_operations sched_feat_fops = { |
784 | .open = sched_feat_open, | 784 | .open = sched_feat_open, |
785 | .write = sched_feat_write, | 785 | .write = sched_feat_write, |
786 | .read = seq_read, | 786 | .read = seq_read, |
diff --git a/kernel/time/timer_list.c b/kernel/time/timer_list.c index fddd69d16e03..1b5b7aa2fdfd 100644 --- a/kernel/time/timer_list.c +++ b/kernel/time/timer_list.c | |||
@@ -275,7 +275,7 @@ static int timer_list_open(struct inode *inode, struct file *filp) | |||
275 | return single_open(filp, timer_list_show, NULL); | 275 | return single_open(filp, timer_list_show, NULL); |
276 | } | 276 | } |
277 | 277 | ||
278 | static struct file_operations timer_list_fops = { | 278 | static const struct file_operations timer_list_fops = { |
279 | .open = timer_list_open, | 279 | .open = timer_list_open, |
280 | .read = seq_read, | 280 | .read = seq_read, |
281 | .llseek = seq_lseek, | 281 | .llseek = seq_lseek, |
diff --git a/kernel/time/timer_stats.c b/kernel/time/timer_stats.c index 4cde8b9c716f..ee5681f8d7ec 100644 --- a/kernel/time/timer_stats.c +++ b/kernel/time/timer_stats.c | |||
@@ -395,7 +395,7 @@ static int tstats_open(struct inode *inode, struct file *filp) | |||
395 | return single_open(filp, tstats_show, NULL); | 395 | return single_open(filp, tstats_show, NULL); |
396 | } | 396 | } |
397 | 397 | ||
398 | static struct file_operations tstats_fops = { | 398 | static const struct file_operations tstats_fops = { |
399 | .open = tstats_open, | 399 | .open = tstats_open, |
400 | .read = seq_read, | 400 | .read = seq_read, |
401 | .write = tstats_write, | 401 | .write = tstats_write, |