From 9c2e08c592cd357a8330c34def1e8ecfdcf53275 Mon Sep 17 00:00:00 2001 From: Arjan van de Ven Date: Mon, 12 Feb 2007 00:55:37 -0800 Subject: [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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- sound/oss/btaudio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sound/oss/btaudio.c') diff --git a/sound/oss/btaudio.c b/sound/oss/btaudio.c index ad7210a00dc0..f845528e1fac 100644 --- a/sound/oss/btaudio.c +++ b/sound/oss/btaudio.c @@ -429,7 +429,7 @@ static int btaudio_mixer_ioctl(struct inode *inode, struct file *file, return 0; } -static struct file_operations btaudio_mixer_fops = { +static const struct file_operations btaudio_mixer_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .open = btaudio_mixer_open, @@ -796,7 +796,7 @@ static unsigned int btaudio_dsp_poll(struct file *file, struct poll_table_struct return mask; } -static struct file_operations btaudio_digital_dsp_fops = { +static const struct file_operations btaudio_digital_dsp_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .open = btaudio_dsp_open_digital, @@ -807,7 +807,7 @@ static struct file_operations btaudio_digital_dsp_fops = { .poll = btaudio_dsp_poll, }; -static struct file_operations btaudio_analog_dsp_fops = { +static const struct file_operations btaudio_analog_dsp_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .open = btaudio_dsp_open_analog, -- cgit v1.2.3-59-g8ed1b