aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7134
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@linux.intel.com>2007-02-12 03:55:33 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-12 12:48:45 -0500
commitfa027c2a0a0d6d1df6b29ee99048502c93da0dd4 (patch)
tree64a6b20c6c6e19a731882f830bd70ca5c8d99943 /drivers/media/video/saa7134
parent2b8693c0617e972fc0b2fd1ebf8de97e15b656c3 (diff)
[PATCH] mark struct file_operations const 4
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. [akpm@sdl.org: dvb fix] 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 'drivers/media/video/saa7134')
-rw-r--r--drivers/media/video/saa7134/saa7134-empress.c2
-rw-r--r--drivers/media/video/saa7134/saa7134-oss.c4
-rw-r--r--drivers/media/video/saa7134/saa7134-video.c4
-rw-r--r--drivers/media/video/saa7134/saa7134.h4
4 files changed, 7 insertions, 7 deletions
diff --git a/drivers/media/video/saa7134/saa7134-empress.c b/drivers/media/video/saa7134/saa7134-empress.c
index daaae870a2c4..f521603482ca 100644
--- a/drivers/media/video/saa7134/saa7134-empress.c
+++ b/drivers/media/video/saa7134/saa7134-empress.c
@@ -319,7 +319,7 @@ static int ts_ioctl(struct inode *inode, struct file *file,
319 return video_usercopy(inode, file, cmd, arg, ts_do_ioctl); 319 return video_usercopy(inode, file, cmd, arg, ts_do_ioctl);
320} 320}
321 321
322static struct file_operations ts_fops = 322static const struct file_operations ts_fops =
323{ 323{
324 .owner = THIS_MODULE, 324 .owner = THIS_MODULE,
325 .open = ts_open, 325 .open = ts_open,
diff --git a/drivers/media/video/saa7134/saa7134-oss.c b/drivers/media/video/saa7134/saa7134-oss.c
index bfcb860d14cc..72444f039e3d 100644
--- a/drivers/media/video/saa7134/saa7134-oss.c
+++ b/drivers/media/video/saa7134/saa7134-oss.c
@@ -563,7 +563,7 @@ static unsigned int dsp_poll(struct file *file, struct poll_table_struct *wait)
563 return mask; 563 return mask;
564} 564}
565 565
566struct file_operations saa7134_dsp_fops = { 566const struct file_operations saa7134_dsp_fops = {
567 .owner = THIS_MODULE, 567 .owner = THIS_MODULE,
568 .open = dsp_open, 568 .open = dsp_open,
569 .release = dsp_release, 569 .release = dsp_release,
@@ -804,7 +804,7 @@ static int mixer_ioctl(struct inode *inode, struct file *file,
804 } 804 }
805} 805}
806 806
807struct file_operations saa7134_mixer_fops = { 807const struct file_operations saa7134_mixer_fops = {
808 .owner = THIS_MODULE, 808 .owner = THIS_MODULE,
809 .open = mixer_open, 809 .open = mixer_open,
810 .release = mixer_release, 810 .release = mixer_release,
diff --git a/drivers/media/video/saa7134/saa7134-video.c b/drivers/media/video/saa7134/saa7134-video.c
index 830617ea81cc..f2cb63053041 100644
--- a/drivers/media/video/saa7134/saa7134-video.c
+++ b/drivers/media/video/saa7134/saa7134-video.c
@@ -2336,7 +2336,7 @@ static int radio_ioctl(struct inode *inode, struct file *file,
2336 return video_usercopy(inode, file, cmd, arg, radio_do_ioctl); 2336 return video_usercopy(inode, file, cmd, arg, radio_do_ioctl);
2337} 2337}
2338 2338
2339static struct file_operations video_fops = 2339static const struct file_operations video_fops =
2340{ 2340{
2341 .owner = THIS_MODULE, 2341 .owner = THIS_MODULE,
2342 .open = video_open, 2342 .open = video_open,
@@ -2349,7 +2349,7 @@ static struct file_operations video_fops =
2349 .llseek = no_llseek, 2349 .llseek = no_llseek,
2350}; 2350};
2351 2351
2352static struct file_operations radio_fops = 2352static const struct file_operations radio_fops =
2353{ 2353{
2354 .owner = THIS_MODULE, 2354 .owner = THIS_MODULE,
2355 .open = video_open, 2355 .open = video_open,
diff --git a/drivers/media/video/saa7134/saa7134.h b/drivers/media/video/saa7134/saa7134.h
index e88ad7b40c47..88cd1297df13 100644
--- a/drivers/media/video/saa7134/saa7134.h
+++ b/drivers/media/video/saa7134/saa7134.h
@@ -683,8 +683,8 @@ int saa_dsp_writel(struct saa7134_dev *dev, int reg, u32 value);
683/* ----------------------------------------------------------- */ 683/* ----------------------------------------------------------- */
684/* saa7134-oss.c */ 684/* saa7134-oss.c */
685 685
686extern struct file_operations saa7134_dsp_fops; 686extern const struct file_operations saa7134_dsp_fops;
687extern struct file_operations saa7134_mixer_fops; 687extern const struct file_operations saa7134_mixer_fops;
688 688
689int saa7134_oss_init1(struct saa7134_dev *dev); 689int saa7134_oss_init1(struct saa7134_dev *dev);
690int saa7134_oss_fini(struct saa7134_dev *dev); 690int saa7134_oss_fini(struct saa7134_dev *dev);