History

constify a bunch of struct file_operations instances

Al Viro committed 13 years ago

Commit 75ef9de1 parent c10c06213 files · +17 −17Browse files

Unified · Split

13 files
  1. arch/powerpc/kvm/book3s_64_mmu_hv.c +1 −1
  2. arch/powerpc/kvm/book3s_64_vio.c +1 −1
  3. arch/powerpc/kvm/book3s_hv.c +1 −1
  4. drivers/media/rc/ir-lirc-codec.c +1 −1
  5. drivers/media/rc/lirc_dev.c +1 −1
  6. drivers/s390/cio/qdio_debug.c +1 −1
  7. drivers/scsi/qla2xxx/qla_os.c +1 −1
  8. drivers/staging/csr/drv.c +2 −2
  9. drivers/staging/dgrp/dgrp_specproc.c +3 −3
  10. drivers/staging/ft1000/ft1000-usb/ft1000_debug.c +1 −1
  11. drivers/staging/rtl8192u/ieee80211/proc.c +1 −1
  12. drivers/staging/silicom/bpctl_mod.c +1 −1
  13. fs/nfsd/nfsctl.c +2 −2
arch/powerpc/kvm/book3s_64_mmu_hv.c+1−1
@@ -1467,7 +1467,7 @@ static int kvm_htab_release(struct inode *inode, struct file *filp) · 1466 unmodified lines
14671467 return 0;
14681468 }
14691469
1470−static struct file_operations kvm_htab_fops = {
1470+static const struct file_operations kvm_htab_fops = {
14711471 .read = kvm_htab_read,
14721472 .write = kvm_htab_write,
14731473 .llseek = default_llseek,
arch/powerpc/kvm/book3s_64_vio.c+1−1
@@ -92,7 +92,7 @@ static int kvm_spapr_tce_release(struct inode *inode, struct file *filp) · 91 unmodified lines
9292 return 0;
9393 }
9494
95−static struct file_operations kvm_spapr_tce_fops = {
95+static const struct file_operations kvm_spapr_tce_fops = {
9696 .mmap = kvm_spapr_tce_mmap,
9797 .release = kvm_spapr_tce_release,
9898 };
arch/powerpc/kvm/book3s_hv.c+1−1
@@ -1483,7 +1483,7 @@ static int kvm_rma_release(struct inode *inode, struct file *filp) · 1482 unmodified lines
14831483 return 0;
14841484 }
14851485
1486−static struct file_operations kvm_rma_fops = {
1486+static const struct file_operations kvm_rma_fops = {
14871487 .mmap = kvm_rma_mmap,
14881488 .release = kvm_rma_release,
14891489 };
drivers/media/rc/ir-lirc-codec.c+1−1
@@ -307,7 +307,7 @@ static void ir_lirc_close(void *data) · 306 unmodified lines
307307 return;
308308 }
309309
310−static struct file_operations lirc_fops = {
310+static const struct file_operations lirc_fops = {
311311 .owner = THIS_MODULE,
312312 .write = ir_lirc_transmit_ir,
313313 .unlocked_ioctl = ir_lirc_ioctl,
drivers/media/rc/lirc_dev.c+1−1
@@ -152,7 +152,7 @@ static int lirc_thread(void *irctl) · 151 unmodified lines
152152 }
153153
154154
155−static struct file_operations lirc_dev_fops = {
155+static const struct file_operations lirc_dev_fops = {
156156 .owner = THIS_MODULE,
157157 .read = lirc_dev_fop_read,
158158 .write = lirc_dev_fop_write,
drivers/s390/cio/qdio_debug.c+1−1
@@ -224,7 +224,7 @@ static int qperf_seq_open(struct inode *inode, struct file *filp) · 223 unmodified lines
224224 file_inode(filp)->i_private);
225225 }
226226
227−static struct file_operations debugfs_perf_fops = {
227+static const struct file_operations debugfs_perf_fops = {
228228 .owner = THIS_MODULE,
229229 .open = qperf_seq_open,
230230 .read = seq_read,
drivers/scsi/qla2xxx/qla_os.c+1−1
@@ -5351,7 +5351,7 @@ static struct pci_driver qla2xxx_pci_driver = { · 5350 unmodified lines
53515351 .err_handler = &qla2xxx_err_handler,
53525352 };
53535353
5354−static struct file_operations apidev_fops = {
5354+static const struct file_operations apidev_fops = {
53555355 .owner = THIS_MODULE,
53565356 .llseek = noop_llseek,
53575357 };
drivers/staging/csr/drv.c+2−2
@@ -1941,7 +1941,7 @@ uf_sme_queue_message(unifi_priv_t *priv, u8 *buffer, int length) · 1940 unmodified lines
19411941 *
19421942 ****************************************************************************
19431943 */
1944−static struct file_operations unifi_fops = {
1944+static const struct file_operations unifi_fops = {
19451945 .owner = THIS_MODULE,
19461946 .open = unifi_open,
19471947 .release = unifi_release,
@@ -2041,7 +2041,7 @@ void uf_destroy_device_nodes(unifi_priv_t *priv) · 93 unmodified lines
20412041 * ----------------------------------------------------------------
20422042 */
20432043 static int
2044−uf_create_debug_device(struct file_operations *fops)
2044+uf_create_debug_device(const struct file_operations *fops)
20452045 {
20462046 int ret;
20472047
drivers/staging/dgrp/dgrp_specproc.c+3−3
@@ -63,7 +63,7 @@ static int dgrp_nodeinfo_proc_open(struct inode *inode, struct file *file); · 62 unmodified lines
6363 static int dgrp_info_proc_open(struct inode *inode, struct file *file);
6464 static int dgrp_config_proc_open(struct inode *inode, struct file *file);
6565
66−static struct file_operations config_proc_file_ops = {
66+static const struct file_operations config_proc_file_ops = {
6767 .owner = THIS_MODULE,
6868 .open = dgrp_config_proc_open,
6969 .read = seq_read,
@@ -72,7 +72,7 @@ static struct file_operations config_proc_file_ops = { · 2 unmodified lines
7272 .write = dgrp_config_proc_write,
7373 };
7474
75−static struct file_operations info_proc_file_ops = {
75+static const struct file_operations info_proc_file_ops = {
7676 .owner = THIS_MODULE,
7777 .open = dgrp_info_proc_open,
7878 .read = seq_read,
@@ -80,7 +80,7 @@ static struct file_operations info_proc_file_ops = { · 1 unmodified line
8080 .release = single_release,
8181 };
8282
83−static struct file_operations nodeinfo_proc_file_ops = {
83+static const struct file_operations nodeinfo_proc_file_ops = {
8484 .owner = THIS_MODULE,
8585 .open = dgrp_nodeinfo_proc_open,
8686 .read = seq_read,
drivers/staging/ft1000/ft1000-usb/ft1000_debug.c+1−1
@@ -55,7 +55,7 @@ int numofmsgbuf = 0; · 54 unmodified lines
5555 //
5656 // Table of entry-point routines for char device
5757 //
58−static struct file_operations ft1000fops =
58+static const struct file_operations ft1000fops =
5959 {
6060 .unlocked_ioctl = ft1000_ioctl,
6161 .poll = ft1000_poll_dev,
drivers/staging/rtl8192u/ieee80211/proc.c+1−1
@@ -99,7 +99,7 @@ static int crypto_info_open(struct inode *inode, struct file *file) · 98 unmodified lines
9999 return seq_open(file, &crypto_seq_ops);
100100 }
101101
102−static struct file_operations proc_crypto_ops = {
102+static const struct file_operations proc_crypto_ops = {
103103 .open = crypto_info_open,
104104 .read = seq_read,
105105 .llseek = seq_lseek,
drivers/staging/silicom/bpctl_mod.c+1−1
@@ -5803,7 +5803,7 @@ static long device_ioctl(struct file *file, /* see include/linux/fs.h */ · 5802 unmodified lines
58035803 return ret;
58045804 }
58055805
5806−struct file_operations Fops = {
5806+static const struct file_operations Fops = {
58075807 .owner = THIS_MODULE,
58085808 .unlocked_ioctl = device_ioctl,
58095809 .open = device_open,
fs/nfsd/nfsctl.c+2−2
@@ -177,7 +177,7 @@ static int export_features_open(struct inode *inode, struct file *file) · 176 unmodified lines
177177 return single_open(file, export_features_show, NULL);
178178 }
179179
180−static struct file_operations export_features_operations = {
180+static const struct file_operations export_features_operations = {
181181 .open = export_features_open,
182182 .read = seq_read,
183183 .llseek = seq_lseek,
@@ -196,7 +196,7 @@ static int supported_enctypes_open(struct inode *inode, struct file *file) · 12 unmodified lines
196196 return single_open(file, supported_enctypes_show, NULL);
197197 }
198198
199−static struct file_operations supported_enctypes_ops = {
199+static const struct file_operations supported_enctypes_ops = {
200200 .open = supported_enctypes_open,
201201 .read = seq_read,
202202 .llseek = seq_lseek,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t