diff options
author | Arjan van de Ven <arjan@linux.intel.com> | 2007-02-12 03:55:34 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-12 12:48:45 -0500 |
commit | 00977a59b951207d38380c75f03a36829950265c (patch) | |
tree | 26933feafebffca95df02c19df03f5e56aada47e /drivers | |
parent | d54b1fdb1d9f82e375a299e22bd366aad52d4c34 (diff) |
[PATCH] mark struct file_operations const 6
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 'drivers')
30 files changed, 36 insertions, 36 deletions
diff --git a/drivers/sbus/char/bpp.c b/drivers/sbus/char/bpp.c index ac7d1258efe..a39ee80c971 100644 --- a/drivers/sbus/char/bpp.c +++ b/drivers/sbus/char/bpp.c | |||
@@ -846,7 +846,7 @@ static int bpp_ioctl(struct inode *inode, struct file *f, unsigned int cmd, | |||
846 | return errno; | 846 | return errno; |
847 | } | 847 | } |
848 | 848 | ||
849 | static struct file_operations bpp_fops = { | 849 | static const struct file_operations bpp_fops = { |
850 | .owner = THIS_MODULE, | 850 | .owner = THIS_MODULE, |
851 | .read = bpp_read, | 851 | .read = bpp_read, |
852 | .write = bpp_write, | 852 | .write = bpp_write, |
diff --git a/drivers/sbus/char/cpwatchdog.c b/drivers/sbus/char/cpwatchdog.c index ad1c7db96cb..0cfd1e4c032 100644 --- a/drivers/sbus/char/cpwatchdog.c +++ b/drivers/sbus/char/cpwatchdog.c | |||
@@ -459,7 +459,7 @@ static irqreturn_t wd_interrupt(int irq, void *dev_id) | |||
459 | return IRQ_HANDLED; | 459 | return IRQ_HANDLED; |
460 | } | 460 | } |
461 | 461 | ||
462 | static struct file_operations wd_fops = { | 462 | static const struct file_operations wd_fops = { |
463 | .owner = THIS_MODULE, | 463 | .owner = THIS_MODULE, |
464 | .ioctl = wd_ioctl, | 464 | .ioctl = wd_ioctl, |
465 | .compat_ioctl = wd_compat_ioctl, | 465 | .compat_ioctl = wd_compat_ioctl, |
diff --git a/drivers/sbus/char/display7seg.c b/drivers/sbus/char/display7seg.c index a4909e0c7f8..2d14a29effe 100644 --- a/drivers/sbus/char/display7seg.c +++ b/drivers/sbus/char/display7seg.c | |||
@@ -166,7 +166,7 @@ static long d7s_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | |||
166 | return error; | 166 | return error; |
167 | } | 167 | } |
168 | 168 | ||
169 | static struct file_operations d7s_fops = { | 169 | static const struct file_operations d7s_fops = { |
170 | .owner = THIS_MODULE, | 170 | .owner = THIS_MODULE, |
171 | .unlocked_ioctl = d7s_ioctl, | 171 | .unlocked_ioctl = d7s_ioctl, |
172 | .compat_ioctl = d7s_ioctl, | 172 | .compat_ioctl = d7s_ioctl, |
diff --git a/drivers/sbus/char/envctrl.c b/drivers/sbus/char/envctrl.c index fff4660cdf9..2cea4f5d208 100644 --- a/drivers/sbus/char/envctrl.c +++ b/drivers/sbus/char/envctrl.c | |||
@@ -705,7 +705,7 @@ envctrl_release(struct inode *inode, struct file *file) | |||
705 | return 0; | 705 | return 0; |
706 | } | 706 | } |
707 | 707 | ||
708 | static struct file_operations envctrl_fops = { | 708 | static const struct file_operations envctrl_fops = { |
709 | .owner = THIS_MODULE, | 709 | .owner = THIS_MODULE, |
710 | .read = envctrl_read, | 710 | .read = envctrl_read, |
711 | .unlocked_ioctl = envctrl_ioctl, | 711 | .unlocked_ioctl = envctrl_ioctl, |
diff --git a/drivers/sbus/char/flash.c b/drivers/sbus/char/flash.c index fa2418f7ad3..6e99507aeb1 100644 --- a/drivers/sbus/char/flash.c +++ b/drivers/sbus/char/flash.c | |||
@@ -142,7 +142,7 @@ flash_release(struct inode *inode, struct file *file) | |||
142 | return 0; | 142 | return 0; |
143 | } | 143 | } |
144 | 144 | ||
145 | static struct file_operations flash_fops = { | 145 | static const struct file_operations flash_fops = { |
146 | /* no write to the Flash, use mmap | 146 | /* no write to the Flash, use mmap |
147 | * and play flash dependent tricks. | 147 | * and play flash dependent tricks. |
148 | */ | 148 | */ |
diff --git a/drivers/sbus/char/jsflash.c b/drivers/sbus/char/jsflash.c index 14631ac11bc..512857a2316 100644 --- a/drivers/sbus/char/jsflash.c +++ b/drivers/sbus/char/jsflash.c | |||
@@ -431,7 +431,7 @@ static int jsf_release(struct inode *inode, struct file *file) | |||
431 | return 0; | 431 | return 0; |
432 | } | 432 | } |
433 | 433 | ||
434 | static struct file_operations jsf_fops = { | 434 | static const struct file_operations jsf_fops = { |
435 | .owner = THIS_MODULE, | 435 | .owner = THIS_MODULE, |
436 | .llseek = jsf_lseek, | 436 | .llseek = jsf_lseek, |
437 | .read = jsf_read, | 437 | .read = jsf_read, |
diff --git a/drivers/sbus/char/openprom.c b/drivers/sbus/char/openprom.c index 4e2a0e2dcc2..e8776230782 100644 --- a/drivers/sbus/char/openprom.c +++ b/drivers/sbus/char/openprom.c | |||
@@ -704,7 +704,7 @@ static int openprom_release(struct inode * inode, struct file * file) | |||
704 | return 0; | 704 | return 0; |
705 | } | 705 | } |
706 | 706 | ||
707 | static struct file_operations openprom_fops = { | 707 | static const struct file_operations openprom_fops = { |
708 | .owner = THIS_MODULE, | 708 | .owner = THIS_MODULE, |
709 | .llseek = no_llseek, | 709 | .llseek = no_llseek, |
710 | .ioctl = openprom_ioctl, | 710 | .ioctl = openprom_ioctl, |
diff --git a/drivers/sbus/char/riowatchdog.c b/drivers/sbus/char/riowatchdog.c index 2a9cc820442..a2fc6b8c133 100644 --- a/drivers/sbus/char/riowatchdog.c +++ b/drivers/sbus/char/riowatchdog.c | |||
@@ -193,7 +193,7 @@ static ssize_t riowd_write(struct file *file, const char __user *buf, size_t cou | |||
193 | return 0; | 193 | return 0; |
194 | } | 194 | } |
195 | 195 | ||
196 | static struct file_operations riowd_fops = { | 196 | static const struct file_operations riowd_fops = { |
197 | .owner = THIS_MODULE, | 197 | .owner = THIS_MODULE, |
198 | .ioctl = riowd_ioctl, | 198 | .ioctl = riowd_ioctl, |
199 | .open = riowd_open, | 199 | .open = riowd_open, |
diff --git a/drivers/sbus/char/rtc.c b/drivers/sbus/char/rtc.c index 9b988baf0b5..94d18582911 100644 --- a/drivers/sbus/char/rtc.c +++ b/drivers/sbus/char/rtc.c | |||
@@ -233,7 +233,7 @@ static int rtc_release(struct inode *inode, struct file *file) | |||
233 | return 0; | 233 | return 0; |
234 | } | 234 | } |
235 | 235 | ||
236 | static struct file_operations rtc_fops = { | 236 | static const struct file_operations rtc_fops = { |
237 | .owner = THIS_MODULE, | 237 | .owner = THIS_MODULE, |
238 | .llseek = no_llseek, | 238 | .llseek = no_llseek, |
239 | .ioctl = rtc_ioctl, | 239 | .ioctl = rtc_ioctl, |
diff --git a/drivers/sbus/char/uctrl.c b/drivers/sbus/char/uctrl.c index b30372f17f1..4d1a505e9e7 100644 --- a/drivers/sbus/char/uctrl.c +++ b/drivers/sbus/char/uctrl.c | |||
@@ -224,7 +224,7 @@ static irqreturn_t uctrl_interrupt(int irq, void *dev_id) | |||
224 | return IRQ_HANDLED; | 224 | return IRQ_HANDLED; |
225 | } | 225 | } |
226 | 226 | ||
227 | static struct file_operations uctrl_fops = { | 227 | static const struct file_operations uctrl_fops = { |
228 | .owner = THIS_MODULE, | 228 | .owner = THIS_MODULE, |
229 | .llseek = no_llseek, | 229 | .llseek = no_llseek, |
230 | .ioctl = uctrl_ioctl, | 230 | .ioctl = uctrl_ioctl, |
diff --git a/drivers/sbus/char/vfc_dev.c b/drivers/sbus/char/vfc_dev.c index 386e7de0b7e..37a04a0cecf 100644 --- a/drivers/sbus/char/vfc_dev.c +++ b/drivers/sbus/char/vfc_dev.c | |||
@@ -44,7 +44,7 @@ | |||
44 | #include "vfc.h" | 44 | #include "vfc.h" |
45 | #include <asm/vfc_ioctls.h> | 45 | #include <asm/vfc_ioctls.h> |
46 | 46 | ||
47 | static struct file_operations vfc_fops; | 47 | static const struct file_operations vfc_fops; |
48 | struct vfc_dev **vfc_dev_lst; | 48 | struct vfc_dev **vfc_dev_lst; |
49 | static char vfcstr[]="vfc"; | 49 | static char vfcstr[]="vfc"; |
50 | static unsigned char saa9051_init_array[VFC_SAA9051_NR] = { | 50 | static unsigned char saa9051_init_array[VFC_SAA9051_NR] = { |
@@ -633,7 +633,7 @@ static int vfc_mmap(struct file *file, struct vm_area_struct *vma) | |||
633 | } | 633 | } |
634 | 634 | ||
635 | 635 | ||
636 | static struct file_operations vfc_fops = { | 636 | static const struct file_operations vfc_fops = { |
637 | .owner = THIS_MODULE, | 637 | .owner = THIS_MODULE, |
638 | .llseek = no_llseek, | 638 | .llseek = no_llseek, |
639 | .ioctl = vfc_ioctl, | 639 | .ioctl = vfc_ioctl, |
diff --git a/drivers/scsi/3w-9xxx.c b/drivers/scsi/3w-9xxx.c index b091a0fc4eb..eb766c3af1c 100644 --- a/drivers/scsi/3w-9xxx.c +++ b/drivers/scsi/3w-9xxx.c | |||
@@ -197,7 +197,7 @@ static struct class_device_attribute *twa_host_attrs[] = { | |||
197 | }; | 197 | }; |
198 | 198 | ||
199 | /* File operations struct for character device */ | 199 | /* File operations struct for character device */ |
200 | static struct file_operations twa_fops = { | 200 | static const struct file_operations twa_fops = { |
201 | .owner = THIS_MODULE, | 201 | .owner = THIS_MODULE, |
202 | .ioctl = twa_chrdev_ioctl, | 202 | .ioctl = twa_chrdev_ioctl, |
203 | .open = twa_chrdev_open, | 203 | .open = twa_chrdev_open, |
diff --git a/drivers/scsi/3w-xxxx.c b/drivers/scsi/3w-xxxx.c index e1b44d6c0c3..bf5d63e1bee 100644 --- a/drivers/scsi/3w-xxxx.c +++ b/drivers/scsi/3w-xxxx.c | |||
@@ -1040,7 +1040,7 @@ static int tw_chrdev_open(struct inode *inode, struct file *file) | |||
1040 | } /* End tw_chrdev_open() */ | 1040 | } /* End tw_chrdev_open() */ |
1041 | 1041 | ||
1042 | /* File operations struct for character device */ | 1042 | /* File operations struct for character device */ |
1043 | static struct file_operations tw_fops = { | 1043 | static const struct file_operations tw_fops = { |
1044 | .owner = THIS_MODULE, | 1044 | .owner = THIS_MODULE, |
1045 | .ioctl = tw_chrdev_ioctl, | 1045 | .ioctl = tw_chrdev_ioctl, |
1046 | .open = tw_chrdev_open, | 1046 | .open = tw_chrdev_open, |
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index a9734e08fe2..0f948c2fb60 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c | |||
@@ -774,7 +774,7 @@ static struct class_device_attribute *aac_attrs[] = { | |||
774 | }; | 774 | }; |
775 | 775 | ||
776 | 776 | ||
777 | static struct file_operations aac_cfg_fops = { | 777 | static const struct file_operations aac_cfg_fops = { |
778 | .owner = THIS_MODULE, | 778 | .owner = THIS_MODULE, |
779 | .ioctl = aac_cfg_ioctl, | 779 | .ioctl = aac_cfg_ioctl, |
780 | #ifdef CONFIG_COMPAT | 780 | #ifdef CONFIG_COMPAT |
diff --git a/drivers/scsi/ch.c b/drivers/scsi/ch.c index f6caa430776..d02759f1346 100644 --- a/drivers/scsi/ch.c +++ b/drivers/scsi/ch.c | |||
@@ -129,7 +129,7 @@ static struct scsi_driver ch_template = | |||
129 | }, | 129 | }, |
130 | }; | 130 | }; |
131 | 131 | ||
132 | static struct file_operations changer_fops = | 132 | static const struct file_operations changer_fops = |
133 | { | 133 | { |
134 | .owner = THIS_MODULE, | 134 | .owner = THIS_MODULE, |
135 | .open = ch_open, | 135 | .open = ch_open, |
diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c index 365db537a28..cd36e81b2d9 100644 --- a/drivers/scsi/dpt_i2o.c +++ b/drivers/scsi/dpt_i2o.c | |||
@@ -116,7 +116,7 @@ static int sys_tbl_len = 0; | |||
116 | static adpt_hba* hba_chain = NULL; | 116 | static adpt_hba* hba_chain = NULL; |
117 | static int hba_count = 0; | 117 | static int hba_count = 0; |
118 | 118 | ||
119 | static struct file_operations adpt_fops = { | 119 | static const struct file_operations adpt_fops = { |
120 | .ioctl = adpt_ioctl, | 120 | .ioctl = adpt_ioctl, |
121 | .open = adpt_open, | 121 | .open = adpt_open, |
122 | .release = adpt_close | 122 | .release = adpt_close |
diff --git a/drivers/scsi/gdth.c b/drivers/scsi/gdth.c index 4c698a71f66..a1992928e67 100644 --- a/drivers/scsi/gdth.c +++ b/drivers/scsi/gdth.c | |||
@@ -687,7 +687,7 @@ MODULE_AUTHOR("Achim Leubner"); | |||
687 | MODULE_LICENSE("GPL"); | 687 | MODULE_LICENSE("GPL"); |
688 | 688 | ||
689 | /* ioctl interface */ | 689 | /* ioctl interface */ |
690 | static struct file_operations gdth_fops = { | 690 | static const struct file_operations gdth_fops = { |
691 | .ioctl = gdth_ioctl, | 691 | .ioctl = gdth_ioctl, |
692 | .open = gdth_open, | 692 | .open = gdth_open, |
693 | .release = gdth_close, | 693 | .release = gdth_close, |
diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c index 77d9d3804cc..808a1b8c404 100644 --- a/drivers/scsi/megaraid.c +++ b/drivers/scsi/megaraid.c | |||
@@ -92,7 +92,7 @@ static struct mega_hbas mega_hbas[MAX_CONTROLLERS]; | |||
92 | /* | 92 | /* |
93 | * The File Operations structure for the serial/ioctl interface of the driver | 93 | * The File Operations structure for the serial/ioctl interface of the driver |
94 | */ | 94 | */ |
95 | static struct file_operations megadev_fops = { | 95 | static const struct file_operations megadev_fops = { |
96 | .owner = THIS_MODULE, | 96 | .owner = THIS_MODULE, |
97 | .ioctl = megadev_ioctl, | 97 | .ioctl = megadev_ioctl, |
98 | .open = megadev_open, | 98 | .open = megadev_open, |
diff --git a/drivers/scsi/megaraid/megaraid_mm.c b/drivers/scsi/megaraid/megaraid_mm.c index c1ff20c4747..f33a678f089 100644 --- a/drivers/scsi/megaraid/megaraid_mm.c +++ b/drivers/scsi/megaraid/megaraid_mm.c | |||
@@ -67,7 +67,7 @@ static struct list_head adapters_list_g; | |||
67 | 67 | ||
68 | static wait_queue_head_t wait_q; | 68 | static wait_queue_head_t wait_q; |
69 | 69 | ||
70 | static struct file_operations lsi_fops = { | 70 | static const struct file_operations lsi_fops = { |
71 | .open = mraid_mm_open, | 71 | .open = mraid_mm_open, |
72 | .ioctl = mraid_mm_ioctl, | 72 | .ioctl = mraid_mm_ioctl, |
73 | #ifdef CONFIG_COMPAT | 73 | #ifdef CONFIG_COMPAT |
diff --git a/drivers/scsi/megaraid/megaraid_sas.c b/drivers/scsi/megaraid/megaraid_sas.c index b5bdd0d7a8b..15e24fcc84f 100644 --- a/drivers/scsi/megaraid/megaraid_sas.c +++ b/drivers/scsi/megaraid/megaraid_sas.c | |||
@@ -2913,7 +2913,7 @@ megasas_mgmt_compat_ioctl(struct file *file, unsigned int cmd, | |||
2913 | /* | 2913 | /* |
2914 | * File operations structure for management interface | 2914 | * File operations structure for management interface |
2915 | */ | 2915 | */ |
2916 | static struct file_operations megasas_mgmt_fops = { | 2916 | static const struct file_operations megasas_mgmt_fops = { |
2917 | .owner = THIS_MODULE, | 2917 | .owner = THIS_MODULE, |
2918 | .open = megasas_mgmt_open, | 2918 | .open = megasas_mgmt_open, |
2919 | .release = megasas_mgmt_release, | 2919 | .release = megasas_mgmt_release, |
diff --git a/drivers/scsi/osst.c b/drivers/scsi/osst.c index bd6bbf61adb..9668b73872c 100644 --- a/drivers/scsi/osst.c +++ b/drivers/scsi/osst.c | |||
@@ -5522,7 +5522,7 @@ __setup("osst=", osst_setup); | |||
5522 | 5522 | ||
5523 | #endif | 5523 | #endif |
5524 | 5524 | ||
5525 | static struct file_operations osst_fops = { | 5525 | static const struct file_operations osst_fops = { |
5526 | .owner = THIS_MODULE, | 5526 | .owner = THIS_MODULE, |
5527 | .read = osst_read, | 5527 | .read = osst_read, |
5528 | .write = osst_write, | 5528 | .write = osst_write, |
diff --git a/drivers/scsi/scsi_proc.c b/drivers/scsi/scsi_proc.c index 524a5f7a519..69d6e9b198c 100644 --- a/drivers/scsi/scsi_proc.c +++ b/drivers/scsi/scsi_proc.c | |||
@@ -308,7 +308,7 @@ static int proc_scsi_open(struct inode *inode, struct file *file) | |||
308 | return single_open(file, proc_scsi_show, NULL); | 308 | return single_open(file, proc_scsi_show, NULL); |
309 | } | 309 | } |
310 | 310 | ||
311 | static struct file_operations proc_scsi_operations = { | 311 | static const struct file_operations proc_scsi_operations = { |
312 | .open = proc_scsi_open, | 312 | .open = proc_scsi_open, |
313 | .read = seq_read, | 313 | .read = seq_read, |
314 | .write = proc_scsi_write, | 314 | .write = proc_scsi_write, |
diff --git a/drivers/scsi/scsi_tgt_if.c b/drivers/scsi/scsi_tgt_if.c index 37bbfbdb870..f2344ab8def 100644 --- a/drivers/scsi/scsi_tgt_if.c +++ b/drivers/scsi/scsi_tgt_if.c | |||
@@ -280,7 +280,7 @@ static int tgt_open(struct inode *inode, struct file *file) | |||
280 | return 0; | 280 | return 0; |
281 | } | 281 | } |
282 | 282 | ||
283 | static struct file_operations tgt_fops = { | 283 | static const struct file_operations tgt_fops = { |
284 | .owner = THIS_MODULE, | 284 | .owner = THIS_MODULE, |
285 | .open = tgt_open, | 285 | .open = tgt_open, |
286 | .poll = tgt_poll, | 286 | .poll = tgt_poll, |
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c index 16e279be4a3..3d2e02381e9 100644 --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c | |||
@@ -3864,7 +3864,7 @@ __setup("st=", st_setup); | |||
3864 | 3864 | ||
3865 | #endif | 3865 | #endif |
3866 | 3866 | ||
3867 | static struct file_operations st_fops = | 3867 | static const struct file_operations st_fops = |
3868 | { | 3868 | { |
3869 | .owner = THIS_MODULE, | 3869 | .owner = THIS_MODULE, |
3870 | .read = st_read, | 3870 | .read = st_read, |
diff --git a/drivers/telephony/ixj.c b/drivers/telephony/ixj.c index 58deaac5b37..71cb64e41a1 100644 --- a/drivers/telephony/ixj.c +++ b/drivers/telephony/ixj.c | |||
@@ -6663,7 +6663,7 @@ static int ixj_fasync(int fd, struct file *file_p, int mode) | |||
6663 | return fasync_helper(fd, file_p, mode, &j->async_queue); | 6663 | return fasync_helper(fd, file_p, mode, &j->async_queue); |
6664 | } | 6664 | } |
6665 | 6665 | ||
6666 | static struct file_operations ixj_fops = | 6666 | static const struct file_operations ixj_fops = |
6667 | { | 6667 | { |
6668 | .owner = THIS_MODULE, | 6668 | .owner = THIS_MODULE, |
6669 | .read = ixj_enhanced_read, | 6669 | .read = ixj_enhanced_read, |
diff --git a/drivers/telephony/phonedev.c b/drivers/telephony/phonedev.c index e41f49afd0f..4d8c2a5b329 100644 --- a/drivers/telephony/phonedev.c +++ b/drivers/telephony/phonedev.c | |||
@@ -127,7 +127,7 @@ void phone_unregister_device(struct phone_device *pfd) | |||
127 | } | 127 | } |
128 | 128 | ||
129 | 129 | ||
130 | static struct file_operations phone_fops = | 130 | static const struct file_operations phone_fops = |
131 | { | 131 | { |
132 | .owner = THIS_MODULE, | 132 | .owner = THIS_MODULE, |
133 | .open = phone_open, | 133 | .open = phone_open, |
diff --git a/drivers/usb/misc/adutux.c b/drivers/usb/misc/adutux.c index af2934e016a..75bfab95ab3 100644 --- a/drivers/usb/misc/adutux.c +++ b/drivers/usb/misc/adutux.c | |||
@@ -644,7 +644,7 @@ exit: | |||
644 | } | 644 | } |
645 | 645 | ||
646 | /* file operations needed when we register this driver */ | 646 | /* file operations needed when we register this driver */ |
647 | static struct file_operations adu_fops = { | 647 | static const struct file_operations adu_fops = { |
648 | .owner = THIS_MODULE, | 648 | .owner = THIS_MODULE, |
649 | .read = adu_read, | 649 | .read = adu_read, |
650 | .write = adu_write, | 650 | .write = adu_write, |
diff --git a/drivers/usb/misc/ftdi-elan.c b/drivers/usb/misc/ftdi-elan.c index 41c0161abdb..0c1d66ddb81 100644 --- a/drivers/usb/misc/ftdi-elan.c +++ b/drivers/usb/misc/ftdi-elan.c | |||
@@ -1209,7 +1209,7 @@ error_1: | |||
1209 | return retval; | 1209 | return retval; |
1210 | } | 1210 | } |
1211 | 1211 | ||
1212 | static struct file_operations ftdi_elan_fops = { | 1212 | static const struct file_operations ftdi_elan_fops = { |
1213 | .owner = THIS_MODULE, | 1213 | .owner = THIS_MODULE, |
1214 | .llseek = no_llseek, | 1214 | .llseek = no_llseek, |
1215 | .ioctl = ftdi_elan_ioctl, | 1215 | .ioctl = ftdi_elan_ioctl, |
diff --git a/drivers/video/mbx/mbxdebugfs.c b/drivers/video/mbx/mbxdebugfs.c index 472a3ca3d92..15b8b3c4330 100644 --- a/drivers/video/mbx/mbxdebugfs.c +++ b/drivers/video/mbx/mbxdebugfs.c | |||
@@ -170,37 +170,37 @@ static ssize_t misc_read_file(struct file *file, char __user *userbuf, | |||
170 | } | 170 | } |
171 | 171 | ||
172 | 172 | ||
173 | static struct file_operations sysconf_fops = { | 173 | static const struct file_operations sysconf_fops = { |
174 | .read = sysconf_read_file, | 174 | .read = sysconf_read_file, |
175 | .write = write_file_dummy, | 175 | .write = write_file_dummy, |
176 | .open = open_file_generic, | 176 | .open = open_file_generic, |
177 | }; | 177 | }; |
178 | 178 | ||
179 | static struct file_operations clock_fops = { | 179 | static const struct file_operations clock_fops = { |
180 | .read = clock_read_file, | 180 | .read = clock_read_file, |
181 | .write = write_file_dummy, | 181 | .write = write_file_dummy, |
182 | .open = open_file_generic, | 182 | .open = open_file_generic, |
183 | }; | 183 | }; |
184 | 184 | ||
185 | static struct file_operations display_fops = { | 185 | static const struct file_operations display_fops = { |
186 | .read = display_read_file, | 186 | .read = display_read_file, |
187 | .write = write_file_dummy, | 187 | .write = write_file_dummy, |
188 | .open = open_file_generic, | 188 | .open = open_file_generic, |
189 | }; | 189 | }; |
190 | 190 | ||
191 | static struct file_operations gsctl_fops = { | 191 | static const struct file_operations gsctl_fops = { |
192 | .read = gsctl_read_file, | 192 | .read = gsctl_read_file, |
193 | .write = write_file_dummy, | 193 | .write = write_file_dummy, |
194 | .open = open_file_generic, | 194 | .open = open_file_generic, |
195 | }; | 195 | }; |
196 | 196 | ||
197 | static struct file_operations sdram_fops = { | 197 | static const struct file_operations sdram_fops = { |
198 | .read = sdram_read_file, | 198 | .read = sdram_read_file, |
199 | .write = write_file_dummy, | 199 | .write = write_file_dummy, |
200 | .open = open_file_generic, | 200 | .open = open_file_generic, |
201 | }; | 201 | }; |
202 | 202 | ||
203 | static struct file_operations misc_fops = { | 203 | static const struct file_operations misc_fops = { |
204 | .read = misc_read_file, | 204 | .read = misc_read_file, |
205 | .write = write_file_dummy, | 205 | .write = write_file_dummy, |
206 | .open = open_file_generic, | 206 | .open = open_file_generic, |
diff --git a/drivers/zorro/proc.c b/drivers/zorro/proc.c index 60b05bc1564..b3ce8859a58 100644 --- a/drivers/zorro/proc.c +++ b/drivers/zorro/proc.c | |||
@@ -75,7 +75,7 @@ proc_bus_zorro_read(struct file *file, char __user *buf, size_t nbytes, loff_t * | |||
75 | return nbytes; | 75 | return nbytes; |
76 | } | 76 | } |
77 | 77 | ||
78 | static struct file_operations proc_bus_zorro_operations = { | 78 | static const struct file_operations proc_bus_zorro_operations = { |
79 | .llseek = proc_bus_zorro_lseek, | 79 | .llseek = proc_bus_zorro_lseek, |
80 | .read = proc_bus_zorro_read, | 80 | .read = proc_bus_zorro_read, |
81 | }; | 81 | }; |