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
1467 return 0;1467 return 0;
1468}1468}
1469 1469
1470static struct file_operations kvm_htab_fops = {1470static const struct file_operations kvm_htab_fops = {
1471 .read = kvm_htab_read,1471 .read = kvm_htab_read,
1472 .write = kvm_htab_write,1472 .write = kvm_htab_write,
1473 .llseek = default_llseek,1473 .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
92 return 0;92 return 0;
93}93}
94 94
95static struct file_operations kvm_spapr_tce_fops = {95static const struct file_operations kvm_spapr_tce_fops = {
96 .mmap = kvm_spapr_tce_mmap,96 .mmap = kvm_spapr_tce_mmap,
97 .release = kvm_spapr_tce_release,97 .release = kvm_spapr_tce_release,
98};98};
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
1483 return 0;1483 return 0;
1484}1484}
1485 1485
1486static struct file_operations kvm_rma_fops = {1486static const struct file_operations kvm_rma_fops = {
1487 .mmap = kvm_rma_mmap,1487 .mmap = kvm_rma_mmap,
1488 .release = kvm_rma_release,1488 .release = kvm_rma_release,
1489};1489};
drivers/media/rc/ir-lirc-codec.c+1−1
@@ -307,7 +307,7 @@ static void ir_lirc_close(void *data) · 306 unmodified lines
307 return;307 return;
308}308}
309 309
310static struct file_operations lirc_fops = {310static const struct file_operations lirc_fops = {
311 .owner = THIS_MODULE,311 .owner = THIS_MODULE,
312 .write = ir_lirc_transmit_ir,312 .write = ir_lirc_transmit_ir,
313 .unlocked_ioctl = ir_lirc_ioctl,313 .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
152}152}
153 153
154 154
155static struct file_operations lirc_dev_fops = {155static const struct file_operations lirc_dev_fops = {
156 .owner = THIS_MODULE,156 .owner = THIS_MODULE,
157 .read = lirc_dev_fop_read,157 .read = lirc_dev_fop_read,
158 .write = lirc_dev_fop_write,158 .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
224 file_inode(filp)->i_private);224 file_inode(filp)->i_private);
225}225}
226 226
227static struct file_operations debugfs_perf_fops = {227static const struct file_operations debugfs_perf_fops = {
228 .owner = THIS_MODULE,228 .owner = THIS_MODULE,
229 .open = qperf_seq_open,229 .open = qperf_seq_open,
230 .read = seq_read,230 .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
5351 .err_handler = &qla2xxx_err_handler,5351 .err_handler = &qla2xxx_err_handler,
5352};5352};
5353 5353
5354static struct file_operations apidev_fops = {5354static const struct file_operations apidev_fops = {
5355 .owner = THIS_MODULE,5355 .owner = THIS_MODULE,
5356 .llseek = noop_llseek,5356 .llseek = noop_llseek,
5357};5357};
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
1941 *1941 *
1942 ****************************************************************************1942 ****************************************************************************
1943 */1943 */
1944static struct file_operations unifi_fops = {1944static const struct file_operations unifi_fops = {
1945 .owner = THIS_MODULE,1945 .owner = THIS_MODULE,
1946 .open = unifi_open,1946 .open = unifi_open,
1947 .release = unifi_release,1947 .release = unifi_release,
@@ -2041,7 +2041,7 @@ void uf_destroy_device_nodes(unifi_priv_t *priv) · 93 unmodified lines
2041 * ----------------------------------------------------------------2041 * ----------------------------------------------------------------
2042 */2042 */
2043static int2043static int
2044uf_create_debug_device(struct file_operations *fops)2044uf_create_debug_device(const struct file_operations *fops)
2045{2045{
2046 int ret;2046 int ret;
2047 2047
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
63static int dgrp_info_proc_open(struct inode *inode, struct file *file);63static int dgrp_info_proc_open(struct inode *inode, struct file *file);
64static int dgrp_config_proc_open(struct inode *inode, struct file *file);64static int dgrp_config_proc_open(struct inode *inode, struct file *file);
65 65
66static struct file_operations config_proc_file_ops = {66static const struct file_operations config_proc_file_ops = {
67 .owner = THIS_MODULE,67 .owner = THIS_MODULE,
68 .open = dgrp_config_proc_open,68 .open = dgrp_config_proc_open,
69 .read = seq_read,69 .read = seq_read,
@@ -72,7 +72,7 @@ static struct file_operations config_proc_file_ops = { · 2 unmodified lines
72 .write = dgrp_config_proc_write,72 .write = dgrp_config_proc_write,
73};73};
74 74
75static struct file_operations info_proc_file_ops = {75static const struct file_operations info_proc_file_ops = {
76 .owner = THIS_MODULE,76 .owner = THIS_MODULE,
77 .open = dgrp_info_proc_open,77 .open = dgrp_info_proc_open,
78 .read = seq_read,78 .read = seq_read,
@@ -80,7 +80,7 @@ static struct file_operations info_proc_file_ops = { · 1 unmodified line
80 .release = single_release,80 .release = single_release,
81};81};
82 82
83static struct file_operations nodeinfo_proc_file_ops = {83static const struct file_operations nodeinfo_proc_file_ops = {
84 .owner = THIS_MODULE,84 .owner = THIS_MODULE,
85 .open = dgrp_nodeinfo_proc_open,85 .open = dgrp_nodeinfo_proc_open,
86 .read = seq_read,86 .read = seq_read,
drivers/staging/ft1000/ft1000-usb/ft1000_debug.c+1−1
@@ -55,7 +55,7 @@ int numofmsgbuf = 0; · 54 unmodified lines
55//55//
56// Table of entry-point routines for char device56// Table of entry-point routines for char device
57//57//
58static struct file_operations ft1000fops =58static const struct file_operations ft1000fops =
59{59{
60 .unlocked_ioctl = ft1000_ioctl,60 .unlocked_ioctl = ft1000_ioctl,
61 .poll = ft1000_poll_dev,61 .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
99 return seq_open(file, &crypto_seq_ops);99 return seq_open(file, &crypto_seq_ops);
100}100}
101 101
102static struct file_operations proc_crypto_ops = {102static const struct file_operations proc_crypto_ops = {
103 .open = crypto_info_open,103 .open = crypto_info_open,
104 .read = seq_read,104 .read = seq_read,
105 .llseek = seq_lseek,105 .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
5803 return ret;5803 return ret;
5804}5804}
5805 5805
5806struct file_operations Fops = {5806static const struct file_operations Fops = {
5807 .owner = THIS_MODULE,5807 .owner = THIS_MODULE,
5808 .unlocked_ioctl = device_ioctl,5808 .unlocked_ioctl = device_ioctl,
5809 .open = device_open,5809 .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
177 return single_open(file, export_features_show, NULL);177 return single_open(file, export_features_show, NULL);
178}178}
179 179
180static struct file_operations export_features_operations = {180static const struct file_operations export_features_operations = {
181 .open = export_features_open,181 .open = export_features_open,
182 .read = seq_read,182 .read = seq_read,
183 .llseek = seq_lseek,183 .llseek = seq_lseek,
@@ -196,7 +196,7 @@ static int supported_enctypes_open(struct inode *inode, struct file *file) · 12 unmodified lines
196 return single_open(file, supported_enctypes_show, NULL);196 return single_open(file, supported_enctypes_show, NULL);
197}197}
198 198
199static struct file_operations supported_enctypes_ops = {199static const struct file_operations supported_enctypes_ops = {
200 .open = supported_enctypes_open,200 .open = supported_enctypes_open,
201 .read = seq_read,201 .read = seq_read,
202 .llseek = seq_lseek,202 .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