]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
constify a bunch of struct file_operations instances
authorAl Viro <viro@zeniv.linux.org.uk>
Thu, 4 Apr 2013 23:09:41 +0000 (19:09 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Tue, 9 Apr 2013 18:16:20 +0000 (14:16 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 files changed:
arch/powerpc/kvm/book3s_64_mmu_hv.c
arch/powerpc/kvm/book3s_64_vio.c
arch/powerpc/kvm/book3s_hv.c
drivers/media/rc/ir-lirc-codec.c
drivers/media/rc/lirc_dev.c
drivers/s390/cio/qdio_debug.c
drivers/scsi/qla2xxx/qla_os.c
drivers/staging/csr/drv.c
drivers/staging/dgrp/dgrp_specproc.c
drivers/staging/ft1000/ft1000-usb/ft1000_debug.c
drivers/staging/rtl8192u/ieee80211/proc.c
drivers/staging/silicom/bpctl_mod.c
fs/nfsd/nfsctl.c

index 8cc18abd6dde6b486996bf9f4719fdeb12e0c65e..da98e26f6e454c95be4596a12f85da4840b6f1e9 100644 (file)
@@ -1467,7 +1467,7 @@ static int kvm_htab_release(struct inode *inode, struct file *filp)
        return 0;
 }
 
-static struct file_operations kvm_htab_fops = {
+static const struct file_operations kvm_htab_fops = {
        .read           = kvm_htab_read,
        .write          = kvm_htab_write,
        .llseek         = default_llseek,
index 72ffc899c082213076f872bcba48d494d9dfecbb..b2d3f3b2de72a7a796e88bee5e28184adc3ae0a6 100644 (file)
@@ -92,7 +92,7 @@ static int kvm_spapr_tce_release(struct inode *inode, struct file *filp)
        return 0;
 }
 
-static struct file_operations kvm_spapr_tce_fops = {
+static const struct file_operations kvm_spapr_tce_fops = {
        .mmap           = kvm_spapr_tce_mmap,
        .release        = kvm_spapr_tce_release,
 };
index 80dcc53a1abaf813659cf2102b9e701c30fc16cf..b62bd1b97c6878ffe2c8e655250fccb736b92b0a 100644 (file)
@@ -1483,7 +1483,7 @@ static int kvm_rma_release(struct inode *inode, struct file *filp)
        return 0;
 }
 
-static struct file_operations kvm_rma_fops = {
+static const struct file_operations kvm_rma_fops = {
        .mmap           = kvm_rma_mmap,
        .release        = kvm_rma_release,
 };
index 9945e5e7f61a6d58d94105c6f5a6a3c9555d93fb..8ee080ef2f2c636cc743f1c28c0f978b0871fc4c 100644 (file)
@@ -307,7 +307,7 @@ static void ir_lirc_close(void *data)
        return;
 }
 
-static struct file_operations lirc_fops = {
+static const struct file_operations lirc_fops = {
        .owner          = THIS_MODULE,
        .write          = ir_lirc_transmit_ir,
        .unlocked_ioctl = ir_lirc_ioctl,
index 5247d94fea29f354a351333a0d0d3020e94ca684..8dc057b273f25b49f7f4960896828c9437e3b489 100644 (file)
@@ -152,7 +152,7 @@ static int lirc_thread(void *irctl)
 }
 
 
-static struct file_operations lirc_dev_fops = {
+static const struct file_operations lirc_dev_fops = {
        .owner          = THIS_MODULE,
        .read           = lirc_dev_fop_read,
        .write          = lirc_dev_fop_write,
index ccaae9d63d272581b0610bf4a28505470fda1d0b..4221b02085ad46dc13838461c901abd72c786fca 100644 (file)
@@ -224,7 +224,7 @@ static int qperf_seq_open(struct inode *inode, struct file *filp)
                           file_inode(filp)->i_private);
 }
 
-static struct file_operations debugfs_perf_fops = {
+static const struct file_operations debugfs_perf_fops = {
        .owner   = THIS_MODULE,
        .open    = qperf_seq_open,
        .read    = seq_read,
index 2c6dd3dfe0f4de6d4ff867f873d1697c8dd2afd7..ccb5e6404d09a85a026ac2c03c1470433b2937ba 100644 (file)
@@ -5351,7 +5351,7 @@ static struct pci_driver qla2xxx_pci_driver = {
        .err_handler    = &qla2xxx_err_handler,
 };
 
-static struct file_operations apidev_fops = {
+static const struct file_operations apidev_fops = {
        .owner = THIS_MODULE,
        .llseek = noop_llseek,
 };
index 3bd52fdeac3b162f2b628444a9a4e97782cd4a95..33742ba13779bc0d539f35ced50c92efb67b3585 100644 (file)
@@ -1941,7 +1941,7 @@ uf_sme_queue_message(unifi_priv_t *priv, u8 *buffer, int length)
  *
  ****************************************************************************
  */
-static struct file_operations unifi_fops = {
+static const struct file_operations unifi_fops = {
     .owner      = THIS_MODULE,
     .open       = unifi_open,
     .release    = unifi_release,
@@ -2041,7 +2041,7 @@ void uf_destroy_device_nodes(unifi_priv_t *priv)
  * ----------------------------------------------------------------
  */
 static int
-uf_create_debug_device(struct file_operations *fops)
+uf_create_debug_device(const struct file_operations *fops)
 {
     int ret;
 
index 99c993b1337852b591ae1c00cf88747ef99fea93..b990b2686ba9569b827b0916a550a6d358b822f4 100644 (file)
@@ -63,7 +63,7 @@ static int dgrp_nodeinfo_proc_open(struct inode *inode, struct file *file);
 static int dgrp_info_proc_open(struct inode *inode, struct file *file);
 static int dgrp_config_proc_open(struct inode *inode, struct file *file);
 
-static struct file_operations config_proc_file_ops = {
+static const struct file_operations config_proc_file_ops = {
        .owner   = THIS_MODULE,
        .open    = dgrp_config_proc_open,
        .read    = seq_read,
@@ -72,7 +72,7 @@ static struct file_operations config_proc_file_ops = {
        .write   = dgrp_config_proc_write,
 };
 
-static struct file_operations info_proc_file_ops = {
+static const struct file_operations info_proc_file_ops = {
        .owner   = THIS_MODULE,
        .open    = dgrp_info_proc_open,
        .read    = seq_read,
@@ -80,7 +80,7 @@ static struct file_operations info_proc_file_ops = {
        .release = single_release,
 };
 
-static struct file_operations nodeinfo_proc_file_ops = {
+static const struct file_operations nodeinfo_proc_file_ops = {
        .owner   = THIS_MODULE,
        .open    = dgrp_nodeinfo_proc_open,
        .read    = seq_read,
index 297389e8c608367f5f5c3db88bdc448d73504b98..3251d2e073b5ebc3f5cbac27469fff23a99fbd59 100644 (file)
@@ -55,7 +55,7 @@ int numofmsgbuf = 0;
 //
 // Table of entry-point routines for char device
 //
-static struct file_operations ft1000fops =
+static const struct file_operations ft1000fops =
 {
        .unlocked_ioctl = ft1000_ioctl,
        .poll           = ft1000_poll_dev,
index 54026a412ca4997bb67149085ae86b4e42cab4e0..c426dfdd9fddf54587876519046e51a8acca3d2e 100644 (file)
@@ -99,7 +99,7 @@ static int crypto_info_open(struct inode *inode, struct file *file)
        return seq_open(file, &crypto_seq_ops);
 }
 
-static struct file_operations proc_crypto_ops = {
+static const struct file_operations proc_crypto_ops = {
        .open           = crypto_info_open,
        .read           = seq_read,
        .llseek         = seq_lseek,
index e2da0fb3f98e0ece4e2e27d9709dfa7f3d8ccf41..2cfa800e248cfd062a474201f401c7cb322b28d9 100644 (file)
@@ -5803,7 +5803,7 @@ static long device_ioctl(struct file *file,       /* see include/linux/fs.h */
        return ret;
 }
 
-struct file_operations Fops = {
+static const struct file_operations Fops = {
        .owner = THIS_MODULE,
        .unlocked_ioctl = device_ioctl,
        .open = device_open,
index f33455b4d957a44f50a873fc5bd53d1727e4b563..5bee0313dffd718d557bd3b01cdb0a2321d59f02 100644 (file)
@@ -177,7 +177,7 @@ static int export_features_open(struct inode *inode, struct file *file)
        return single_open(file, export_features_show, NULL);
 }
 
-static struct file_operations export_features_operations = {
+static const struct file_operations export_features_operations = {
        .open           = export_features_open,
        .read           = seq_read,
        .llseek         = seq_lseek,
@@ -196,7 +196,7 @@ static int supported_enctypes_open(struct inode *inode, struct file *file)
        return single_open(file, supported_enctypes_show, NULL);
 }
 
-static struct file_operations supported_enctypes_ops = {
+static const struct file_operations supported_enctypes_ops = {
        .open           = supported_enctypes_open,
        .read           = seq_read,
        .llseek         = seq_lseek,