diff options
author | Arjan van de Ven <arjan@linux.intel.com> | 2007-02-12 03:55:33 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-12 12:48:45 -0500 |
commit | fa027c2a0a0d6d1df6b29ee99048502c93da0dd4 (patch) | |
tree | 64a6b20c6c6e19a731882f830bd70ca5c8d99943 /drivers/media/radio | |
parent | 2b8693c0617e972fc0b2fd1ebf8de97e15b656c3 (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/radio')
-rw-r--r-- | drivers/media/radio/dsbr100.c | 2 | ||||
-rw-r--r-- | drivers/media/radio/miropcm20-radio.c | 2 | ||||
-rw-r--r-- | drivers/media/radio/miropcm20-rds.c | 2 | ||||
-rw-r--r-- | drivers/media/radio/radio-aimslab.c | 2 | ||||
-rw-r--r-- | drivers/media/radio/radio-aztech.c | 2 | ||||
-rw-r--r-- | drivers/media/radio/radio-cadet.c | 2 | ||||
-rw-r--r-- | drivers/media/radio/radio-gemtek-pci.c | 2 | ||||
-rw-r--r-- | drivers/media/radio/radio-gemtek.c | 2 | ||||
-rw-r--r-- | drivers/media/radio/radio-maestro.c | 2 | ||||
-rw-r--r-- | drivers/media/radio/radio-maxiradio.c | 2 | ||||
-rw-r--r-- | drivers/media/radio/radio-rtrack2.c | 2 | ||||
-rw-r--r-- | drivers/media/radio/radio-sf16fmi.c | 2 | ||||
-rw-r--r-- | drivers/media/radio/radio-sf16fmr2.c | 2 | ||||
-rw-r--r-- | drivers/media/radio/radio-terratec.c | 2 | ||||
-rw-r--r-- | drivers/media/radio/radio-trust.c | 2 | ||||
-rw-r--r-- | drivers/media/radio/radio-typhoon.c | 2 | ||||
-rw-r--r-- | drivers/media/radio/radio-zoltrix.c | 2 |
17 files changed, 17 insertions, 17 deletions
diff --git a/drivers/media/radio/dsbr100.c b/drivers/media/radio/dsbr100.c index db865a0667e5..df8d0520d1d1 100644 --- a/drivers/media/radio/dsbr100.c +++ b/drivers/media/radio/dsbr100.c | |||
@@ -144,7 +144,7 @@ struct dsbr100_device { | |||
144 | 144 | ||
145 | 145 | ||
146 | /* File system interface */ | 146 | /* File system interface */ |
147 | static struct file_operations usb_dsbr100_fops = { | 147 | static const struct file_operations usb_dsbr100_fops = { |
148 | .owner = THIS_MODULE, | 148 | .owner = THIS_MODULE, |
149 | .open = usb_dsbr100_open, | 149 | .open = usb_dsbr100_open, |
150 | .release = usb_dsbr100_close, | 150 | .release = usb_dsbr100_close, |
diff --git a/drivers/media/radio/miropcm20-radio.c b/drivers/media/radio/miropcm20-radio.c index c4312fa0e2f5..c7c9d1dc0690 100644 --- a/drivers/media/radio/miropcm20-radio.c +++ b/drivers/media/radio/miropcm20-radio.c | |||
@@ -216,7 +216,7 @@ static struct pcm20_device pcm20_unit = { | |||
216 | .muted = 1, | 216 | .muted = 1, |
217 | }; | 217 | }; |
218 | 218 | ||
219 | static struct file_operations pcm20_fops = { | 219 | static const struct file_operations pcm20_fops = { |
220 | .owner = THIS_MODULE, | 220 | .owner = THIS_MODULE, |
221 | .open = video_exclusive_open, | 221 | .open = video_exclusive_open, |
222 | .release = video_exclusive_release, | 222 | .release = video_exclusive_release, |
diff --git a/drivers/media/radio/miropcm20-rds.c b/drivers/media/radio/miropcm20-rds.c index c1b1db65e668..c93490ec96bb 100644 --- a/drivers/media/radio/miropcm20-rds.c +++ b/drivers/media/radio/miropcm20-rds.c | |||
@@ -105,7 +105,7 @@ static ssize_t rds_f_read(struct file *file, char __user *buffer, size_t length, | |||
105 | } | 105 | } |
106 | } | 106 | } |
107 | 107 | ||
108 | static struct file_operations rds_fops = { | 108 | static const struct file_operations rds_fops = { |
109 | .owner = THIS_MODULE, | 109 | .owner = THIS_MODULE, |
110 | .read = rds_f_read, | 110 | .read = rds_f_read, |
111 | .open = rds_f_open, | 111 | .open = rds_f_open, |
diff --git a/drivers/media/radio/radio-aimslab.c b/drivers/media/radio/radio-aimslab.c index 3368a89bfadb..b2e88ad28977 100644 --- a/drivers/media/radio/radio-aimslab.c +++ b/drivers/media/radio/radio-aimslab.c | |||
@@ -358,7 +358,7 @@ static int rt_ioctl(struct inode *inode, struct file *file, | |||
358 | 358 | ||
359 | static struct rt_device rtrack_unit; | 359 | static struct rt_device rtrack_unit; |
360 | 360 | ||
361 | static struct file_operations rtrack_fops = { | 361 | static const struct file_operations rtrack_fops = { |
362 | .owner = THIS_MODULE, | 362 | .owner = THIS_MODULE, |
363 | .open = video_exclusive_open, | 363 | .open = video_exclusive_open, |
364 | .release = video_exclusive_release, | 364 | .release = video_exclusive_release, |
diff --git a/drivers/media/radio/radio-aztech.c b/drivers/media/radio/radio-aztech.c index 3ba5fa8cf7e6..19d45cc940b5 100644 --- a/drivers/media/radio/radio-aztech.c +++ b/drivers/media/radio/radio-aztech.c | |||
@@ -314,7 +314,7 @@ static int az_ioctl(struct inode *inode, struct file *file, | |||
314 | 314 | ||
315 | static struct az_device aztech_unit; | 315 | static struct az_device aztech_unit; |
316 | 316 | ||
317 | static struct file_operations aztech_fops = { | 317 | static const struct file_operations aztech_fops = { |
318 | .owner = THIS_MODULE, | 318 | .owner = THIS_MODULE, |
319 | .open = video_exclusive_open, | 319 | .open = video_exclusive_open, |
320 | .release = video_exclusive_release, | 320 | .release = video_exclusive_release, |
diff --git a/drivers/media/radio/radio-cadet.c b/drivers/media/radio/radio-cadet.c index 69d4b7919c5a..8fbf0d8bd278 100644 --- a/drivers/media/radio/radio-cadet.c +++ b/drivers/media/radio/radio-cadet.c | |||
@@ -507,7 +507,7 @@ cadet_poll(struct file *file, struct poll_table_struct *wait) | |||
507 | } | 507 | } |
508 | 508 | ||
509 | 509 | ||
510 | static struct file_operations cadet_fops = { | 510 | static const struct file_operations cadet_fops = { |
511 | .owner = THIS_MODULE, | 511 | .owner = THIS_MODULE, |
512 | .open = cadet_open, | 512 | .open = cadet_open, |
513 | .release = cadet_release, | 513 | .release = cadet_release, |
diff --git a/drivers/media/radio/radio-gemtek-pci.c b/drivers/media/radio/radio-gemtek-pci.c index eb14106f66fa..05e5aa77025f 100644 --- a/drivers/media/radio/radio-gemtek-pci.c +++ b/drivers/media/radio/radio-gemtek-pci.c | |||
@@ -346,7 +346,7 @@ MODULE_DEVICE_TABLE( pci, gemtek_pci_id ); | |||
346 | 346 | ||
347 | static int mx = 1; | 347 | static int mx = 1; |
348 | 348 | ||
349 | static struct file_operations gemtek_pci_fops = { | 349 | static const struct file_operations gemtek_pci_fops = { |
350 | .owner = THIS_MODULE, | 350 | .owner = THIS_MODULE, |
351 | .open = video_exclusive_open, | 351 | .open = video_exclusive_open, |
352 | .release = video_exclusive_release, | 352 | .release = video_exclusive_release, |
diff --git a/drivers/media/radio/radio-gemtek.c b/drivers/media/radio/radio-gemtek.c index 730fe16126cb..36c4be6622c7 100644 --- a/drivers/media/radio/radio-gemtek.c +++ b/drivers/media/radio/radio-gemtek.c | |||
@@ -296,7 +296,7 @@ static int gemtek_ioctl(struct inode *inode, struct file *file, | |||
296 | 296 | ||
297 | static struct gemtek_device gemtek_unit; | 297 | static struct gemtek_device gemtek_unit; |
298 | 298 | ||
299 | static struct file_operations gemtek_fops = { | 299 | static const struct file_operations gemtek_fops = { |
300 | .owner = THIS_MODULE, | 300 | .owner = THIS_MODULE, |
301 | .open = video_exclusive_open, | 301 | .open = video_exclusive_open, |
302 | .release = video_exclusive_release, | 302 | .release = video_exclusive_release, |
diff --git a/drivers/media/radio/radio-maestro.c b/drivers/media/radio/radio-maestro.c index e8ce5f75cf12..9bba6eb10925 100644 --- a/drivers/media/radio/radio-maestro.c +++ b/drivers/media/radio/radio-maestro.c | |||
@@ -99,7 +99,7 @@ static struct pci_driver maestro_r_driver = { | |||
99 | .remove = __devexit_p(maestro_remove), | 99 | .remove = __devexit_p(maestro_remove), |
100 | }; | 100 | }; |
101 | 101 | ||
102 | static struct file_operations maestro_fops = { | 102 | static const struct file_operations maestro_fops = { |
103 | .owner = THIS_MODULE, | 103 | .owner = THIS_MODULE, |
104 | .open = video_exclusive_open, | 104 | .open = video_exclusive_open, |
105 | .release = video_exclusive_release, | 105 | .release = video_exclusive_release, |
diff --git a/drivers/media/radio/radio-maxiradio.c b/drivers/media/radio/radio-maxiradio.c index c2eeae7a10d0..00a2f31d2af3 100644 --- a/drivers/media/radio/radio-maxiradio.c +++ b/drivers/media/radio/radio-maxiradio.c | |||
@@ -91,7 +91,7 @@ module_param(radio_nr, int, 0); | |||
91 | static int radio_ioctl(struct inode *inode, struct file *file, | 91 | static int radio_ioctl(struct inode *inode, struct file *file, |
92 | unsigned int cmd, unsigned long arg); | 92 | unsigned int cmd, unsigned long arg); |
93 | 93 | ||
94 | static struct file_operations maxiradio_fops = { | 94 | static const struct file_operations maxiradio_fops = { |
95 | .owner = THIS_MODULE, | 95 | .owner = THIS_MODULE, |
96 | .open = video_exclusive_open, | 96 | .open = video_exclusive_open, |
97 | .release = video_exclusive_release, | 97 | .release = video_exclusive_release, |
diff --git a/drivers/media/radio/radio-rtrack2.c b/drivers/media/radio/radio-rtrack2.c index b9e98483e58d..f6683872251e 100644 --- a/drivers/media/radio/radio-rtrack2.c +++ b/drivers/media/radio/radio-rtrack2.c | |||
@@ -262,7 +262,7 @@ static int rt_ioctl(struct inode *inode, struct file *file, | |||
262 | 262 | ||
263 | static struct rt_device rtrack2_unit; | 263 | static struct rt_device rtrack2_unit; |
264 | 264 | ||
265 | static struct file_operations rtrack2_fops = { | 265 | static const struct file_operations rtrack2_fops = { |
266 | .owner = THIS_MODULE, | 266 | .owner = THIS_MODULE, |
267 | .open = video_exclusive_open, | 267 | .open = video_exclusive_open, |
268 | .release = video_exclusive_release, | 268 | .release = video_exclusive_release, |
diff --git a/drivers/media/radio/radio-sf16fmi.c b/drivers/media/radio/radio-sf16fmi.c index ecc854b4ba38..f4619e4dda4f 100644 --- a/drivers/media/radio/radio-sf16fmi.c +++ b/drivers/media/radio/radio-sf16fmi.c | |||
@@ -265,7 +265,7 @@ static int fmi_ioctl(struct inode *inode, struct file *file, | |||
265 | 265 | ||
266 | static struct fmi_device fmi_unit; | 266 | static struct fmi_device fmi_unit; |
267 | 267 | ||
268 | static struct file_operations fmi_fops = { | 268 | static const struct file_operations fmi_fops = { |
269 | .owner = THIS_MODULE, | 269 | .owner = THIS_MODULE, |
270 | .open = video_exclusive_open, | 270 | .open = video_exclusive_open, |
271 | .release = video_exclusive_release, | 271 | .release = video_exclusive_release, |
diff --git a/drivers/media/radio/radio-sf16fmr2.c b/drivers/media/radio/radio-sf16fmr2.c index 4444dce864a9..b96fafe1f9da 100644 --- a/drivers/media/radio/radio-sf16fmr2.c +++ b/drivers/media/radio/radio-sf16fmr2.c | |||
@@ -410,7 +410,7 @@ static int fmr2_ioctl(struct inode *inode, struct file *file, | |||
410 | 410 | ||
411 | static struct fmr2_device fmr2_unit; | 411 | static struct fmr2_device fmr2_unit; |
412 | 412 | ||
413 | static struct file_operations fmr2_fops = { | 413 | static const struct file_operations fmr2_fops = { |
414 | .owner = THIS_MODULE, | 414 | .owner = THIS_MODULE, |
415 | .open = video_exclusive_open, | 415 | .open = video_exclusive_open, |
416 | .release = video_exclusive_release, | 416 | .release = video_exclusive_release, |
diff --git a/drivers/media/radio/radio-terratec.c b/drivers/media/radio/radio-terratec.c index f539491a0d76..d59a27accb84 100644 --- a/drivers/media/radio/radio-terratec.c +++ b/drivers/media/radio/radio-terratec.c | |||
@@ -338,7 +338,7 @@ static int tt_ioctl(struct inode *inode, struct file *file, | |||
338 | 338 | ||
339 | static struct tt_device terratec_unit; | 339 | static struct tt_device terratec_unit; |
340 | 340 | ||
341 | static struct file_operations terratec_fops = { | 341 | static const struct file_operations terratec_fops = { |
342 | .owner = THIS_MODULE, | 342 | .owner = THIS_MODULE, |
343 | .open = video_exclusive_open, | 343 | .open = video_exclusive_open, |
344 | .release = video_exclusive_release, | 344 | .release = video_exclusive_release, |
diff --git a/drivers/media/radio/radio-trust.c b/drivers/media/radio/radio-trust.c index bb03ad5a2033..6d7f1e7116ea 100644 --- a/drivers/media/radio/radio-trust.c +++ b/drivers/media/radio/radio-trust.c | |||
@@ -325,7 +325,7 @@ static int tr_ioctl(struct inode *inode, struct file *file, | |||
325 | return video_usercopy(inode, file, cmd, arg, tr_do_ioctl); | 325 | return video_usercopy(inode, file, cmd, arg, tr_do_ioctl); |
326 | } | 326 | } |
327 | 327 | ||
328 | static struct file_operations trust_fops = { | 328 | static const struct file_operations trust_fops = { |
329 | .owner = THIS_MODULE, | 329 | .owner = THIS_MODULE, |
330 | .open = video_exclusive_open, | 330 | .open = video_exclusive_open, |
331 | .release = video_exclusive_release, | 331 | .release = video_exclusive_release, |
diff --git a/drivers/media/radio/radio-typhoon.c b/drivers/media/radio/radio-typhoon.c index 4a72b4d4e62a..3031fef178cb 100644 --- a/drivers/media/radio/radio-typhoon.c +++ b/drivers/media/radio/radio-typhoon.c | |||
@@ -318,7 +318,7 @@ static struct typhoon_device typhoon_unit = | |||
318 | .mutefreq = CONFIG_RADIO_TYPHOON_MUTEFREQ, | 318 | .mutefreq = CONFIG_RADIO_TYPHOON_MUTEFREQ, |
319 | }; | 319 | }; |
320 | 320 | ||
321 | static struct file_operations typhoon_fops = { | 321 | static const struct file_operations typhoon_fops = { |
322 | .owner = THIS_MODULE, | 322 | .owner = THIS_MODULE, |
323 | .open = video_exclusive_open, | 323 | .open = video_exclusive_open, |
324 | .release = video_exclusive_release, | 324 | .release = video_exclusive_release, |
diff --git a/drivers/media/radio/radio-zoltrix.c b/drivers/media/radio/radio-zoltrix.c index 671fe1b1e5bc..ec08491fb7c5 100644 --- a/drivers/media/radio/radio-zoltrix.c +++ b/drivers/media/radio/radio-zoltrix.c | |||
@@ -373,7 +373,7 @@ static int zol_ioctl(struct inode *inode, struct file *file, | |||
373 | 373 | ||
374 | static struct zol_device zoltrix_unit; | 374 | static struct zol_device zoltrix_unit; |
375 | 375 | ||
376 | static struct file_operations zoltrix_fops = | 376 | static const struct file_operations zoltrix_fops = |
377 | { | 377 | { |
378 | .owner = THIS_MODULE, | 378 | .owner = THIS_MODULE, |
379 | .open = video_exclusive_open, | 379 | .open = video_exclusive_open, |