diff options
author | Arjan van de Ven <arjan@linux.intel.com> | 2007-02-12 03:55:37 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-12 12:48:46 -0500 |
commit | 9c2e08c592cd357a8330c34def1e8ecfdcf53275 (patch) | |
tree | 62e7449e43bb502f2e9630ab41832ceccd9a0f65 /sound/oss/dmasound | |
parent | da7071d7e32d15149cc513f096a3638097b66387 (diff) |
[PATCH] mark struct file_operations const 9
Many struct file_operations in the kernel can be "const". Marking them const
moves these to the .rodata section, which avoids false sharing with potential
dirty data. In addition it'll catch accidental writes at compile time to
these shared resources.
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'sound/oss/dmasound')
-rw-r--r-- | sound/oss/dmasound/dmasound_core.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/oss/dmasound/dmasound_core.c b/sound/oss/dmasound/dmasound_core.c index 80b836e80d99..a0ec886f2aa3 100644 --- a/sound/oss/dmasound/dmasound_core.c +++ b/sound/oss/dmasound/dmasound_core.c | |||
@@ -371,7 +371,7 @@ static int mixer_ioctl(struct inode *inode, struct file *file, u_int cmd, | |||
371 | return -EINVAL; | 371 | return -EINVAL; |
372 | } | 372 | } |
373 | 373 | ||
374 | static struct file_operations mixer_fops = | 374 | static const struct file_operations mixer_fops = |
375 | { | 375 | { |
376 | .owner = THIS_MODULE, | 376 | .owner = THIS_MODULE, |
377 | .llseek = no_llseek, | 377 | .llseek = no_llseek, |
@@ -1337,7 +1337,7 @@ static int sq_ioctl(struct inode *inode, struct file *file, u_int cmd, | |||
1337 | return -EINVAL; | 1337 | return -EINVAL; |
1338 | } | 1338 | } |
1339 | 1339 | ||
1340 | static struct file_operations sq_fops = | 1340 | static const struct file_operations sq_fops = |
1341 | { | 1341 | { |
1342 | .owner = THIS_MODULE, | 1342 | .owner = THIS_MODULE, |
1343 | .llseek = no_llseek, | 1343 | .llseek = no_llseek, |
@@ -1561,7 +1561,7 @@ static ssize_t state_read(struct file *file, char __user *buf, size_t count, | |||
1561 | return n; | 1561 | return n; |
1562 | } | 1562 | } |
1563 | 1563 | ||
1564 | static struct file_operations state_fops = { | 1564 | static const struct file_operations state_fops = { |
1565 | .owner = THIS_MODULE, | 1565 | .owner = THIS_MODULE, |
1566 | .llseek = no_llseek, | 1566 | .llseek = no_llseek, |
1567 | .read = state_read, | 1567 | .read = state_read, |