diff --git a/block/blktrace.c b/block/blktrace.c index d36b32ed22f4f7e5abf12112fbe95918115ae90f..3f0e7c37c059037080cbe44456f176c5a4800319 100644 --- a/block/blktrace.c +++ b/block/blktrace.c @@ -264,7 +264,7 @@ static ssize_t blk_dropped_read(struct file *filp, char __user *buffer, return simple_read_from_buffer(buffer, count, ppos, buf, strlen(buf)); } -static struct file_operations blk_dropped_fops = { +static const struct file_operations blk_dropped_fops = { .owner = THIS_MODULE, .open = blk_dropped_open, .read = blk_dropped_read, diff --git a/crypto/proc.c b/crypto/proc.c index dabce0676f63abb358f469c98a57b44afdd774e1..102c751a124c1d0368b9c7e9d8b1c421181e7667 100644 --- a/crypto/proc.c +++ b/crypto/proc.c @@ -101,7 +101,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, diff --git a/drivers/acorn/char/i2c.c b/drivers/acorn/char/i2c.c index 9e584a7af434eec943908eeaa97477e2b0b80f06..157d8b73bb64784fb90ecd1d9ec1bffd22321ada 100644 --- a/drivers/acorn/char/i2c.c +++ b/drivers/acorn/char/i2c.c @@ -238,7 +238,7 @@ static int rtc_ioctl(struct inode *inode, struct file *file, return -EINVAL; } -static struct file_operations rtc_fops = { +static const struct file_operations rtc_fops = { .ioctl = rtc_ioctl, }; diff --git a/drivers/block/DAC960.c b/drivers/block/DAC960.c index 7b2fa3d8f61c0522b0bb6ff07c2e4de6199b31c3..92bf868ca05684a655395cbd78554dc1e3d02beb 100644 --- a/drivers/block/DAC960.c +++ b/drivers/block/DAC960.c @@ -7024,7 +7024,7 @@ static int DAC960_gam_ioctl(struct inode *inode, struct file *file, return -EINVAL; } -static struct file_operations DAC960_gam_fops = { +static const struct file_operations DAC960_gam_fops = { .owner = THIS_MODULE, .ioctl = DAC960_gam_ioctl }; diff --git a/drivers/block/acsi_slm.c b/drivers/block/acsi_slm.c index e04be94d195c5ecca5a8faf9cb0ca6fc24d9b09c..e2e04329096385d3d9d34f08a933cbaa22f837d8 100644 --- a/drivers/block/acsi_slm.c +++ b/drivers/block/acsi_slm.c @@ -269,7 +269,7 @@ static int slm_get_pagesize( int device, int *w, int *h ); static DEFINE_TIMER(slm_timer, slm_test_ready, 0, 0); -static struct file_operations slm_fops = { +static const struct file_operations slm_fops = { .owner = THIS_MODULE, .read = slm_read, .write = slm_write, diff --git a/drivers/block/aoe/aoechr.c b/drivers/block/aoe/aoechr.c index e22b4c9520a9fdecee3317636bb532ea6404cda6..39e563ea08782cf242972b42d3b8c4795e5a83a4 100644 --- a/drivers/block/aoe/aoechr.c +++ b/drivers/block/aoe/aoechr.c @@ -233,7 +233,7 @@ aoechr_read(struct file *filp, char __user *buf, size_t cnt, loff_t *off) } } -static struct file_operations aoe_fops = { +static const struct file_operations aoe_fops = { .write = aoechr_write, .read = aoechr_read, .open = aoechr_open, diff --git a/drivers/block/paride/pg.c b/drivers/block/paride/pg.c index 9970aedbb5d9a05f049b33d7cce2b7079a5436a4..d89e7d32a3b604716a63a03edf7ad0fd3492f6a5 100644 --- a/drivers/block/paride/pg.c +++ b/drivers/block/paride/pg.c @@ -227,7 +227,7 @@ static struct class *pg_class; /* kernel glue structures */ -static struct file_operations pg_fops = { +static const struct file_operations pg_fops = { .owner = THIS_MODULE, .read = pg_read, .write = pg_write, diff --git a/drivers/block/paride/pt.c b/drivers/block/paride/pt.c index c902b25e48697d938179d7002ea7522fab5aad93..9f4e67ee1eb0628917155e99c31810bcbb4a6404 100644 --- a/drivers/block/paride/pt.c +++ b/drivers/block/paride/pt.c @@ -232,7 +232,7 @@ static char pt_scratch[512]; /* scratch block buffer */ /* kernel glue structures */ -static struct file_operations pt_fops = { +static const struct file_operations pt_fops = { .owner = THIS_MODULE, .read = pt_read, .write = pt_write, diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c index c0e89490e3d5c97427eaf2eeb15c42bb672b037f..93fb6ed4ed522da8b53c3dcc96a915bf80e027eb 100644 --- a/drivers/block/pktcdvd.c +++ b/drivers/block/pktcdvd.c @@ -435,7 +435,7 @@ static int pkt_debugfs_fops_open(struct inode *inode, struct file *file) return single_open(file, pkt_debugfs_seq_show, inode->i_private); } -static struct file_operations debug_fops = { +static const struct file_operations debug_fops = { .open = pkt_debugfs_fops_open, .read = seq_read, .llseek = seq_lseek, @@ -2725,7 +2725,7 @@ static int pkt_seq_open(struct inode *inode, struct file *file) return single_open(file, pkt_seq_show, PDE(inode)->data); } -static struct file_operations pkt_proc_fops = { +static const struct file_operations pkt_proc_fops = { .open = pkt_seq_open, .read = seq_read, .llseek = seq_lseek, @@ -3052,7 +3052,7 @@ static int pkt_ctl_ioctl(struct inode *inode, struct file *file, unsigned int cm } -static struct file_operations pkt_ctl_fops = { +static const struct file_operations pkt_ctl_fops = { .ioctl = pkt_ctl_ioctl, .owner = THIS_MODULE, }; diff --git a/drivers/bluetooth/hci_vhci.c b/drivers/bluetooth/hci_vhci.c index a278d98a915126a2dac78c6d1865fc11d89181cf..b71a5ccc587f984d11707d6e557d0e77fccb1d92 100644 --- a/drivers/bluetooth/hci_vhci.c +++ b/drivers/bluetooth/hci_vhci.c @@ -332,7 +332,7 @@ static int vhci_fasync(int fd, struct file *file, int on) return 0; } -static struct file_operations vhci_fops = { +static const struct file_operations vhci_fops = { .owner = THIS_MODULE, .llseek = vhci_llseek, .read = vhci_read, diff --git a/drivers/cdrom/viocd.c b/drivers/cdrom/viocd.c index 93fbf84dcc4a5d48dbd09d34d4ceb6cd3807ea20..dc13ebacedfb4446bc788e72804641e404eeb4a7 100644 --- a/drivers/cdrom/viocd.c +++ b/drivers/cdrom/viocd.c @@ -176,7 +176,7 @@ static int proc_viocd_open(struct inode *inode, struct file *file) return single_open(file, proc_viocd_show, NULL); } -static struct file_operations proc_viocd_operations = { +static const struct file_operations proc_viocd_operations = { .open = proc_viocd_open, .read = seq_read, .llseek = seq_lseek, diff --git a/drivers/char/briq_panel.c b/drivers/char/briq_panel.c index 9f8082f8dd290c61aa9d13d6dc5f5be64c68d47d..7f60a18ef76beca074c8c489fc76ca12846f6436 100644 --- a/drivers/char/briq_panel.c +++ b/drivers/char/briq_panel.c @@ -187,7 +187,7 @@ static ssize_t briq_panel_write(struct file *file, const char __user *buf, size_ return len; } -static struct file_operations briq_panel_fops = { +static const struct file_operations briq_panel_fops = { .owner = THIS_MODULE, .read = briq_panel_read, .write = briq_panel_write, diff --git a/drivers/char/drm/drm_drv.c b/drivers/char/drm/drm_drv.c index a70af0de44533efc1914d236218f363e13ac4891..f5b9b2480c149a9d62641f7dcd4ccc0c2d56db1a 100644 --- a/drivers/char/drm/drm_drv.c +++ b/drivers/char/drm/drm_drv.c @@ -371,7 +371,7 @@ void drm_exit(struct drm_driver *driver) EXPORT_SYMBOL(drm_exit); /** File operations structure */ -static struct file_operations drm_stub_fops = { +static const struct file_operations drm_stub_fops = { .owner = THIS_MODULE, .open = drm_stub_open }; diff --git a/drivers/char/drm/i810_dma.c b/drivers/char/drm/i810_dma.c index 60cb4e45a75e52362db30dc19bf47d428324f96a..603d17fd2d6912e556250a758b7e3336b96bb3b4 100644 --- a/drivers/char/drm/i810_dma.c +++ b/drivers/char/drm/i810_dma.c @@ -112,7 +112,7 @@ static int i810_mmap_buffers(struct file *filp, struct vm_area_struct *vma) return 0; } -static struct file_operations i810_buffer_fops = { +static const struct file_operations i810_buffer_fops = { .open = drm_open, .release = drm_release, .ioctl = drm_ioctl, diff --git a/drivers/char/drm/i830_dma.c b/drivers/char/drm/i830_dma.c index 95224455ec0cf55078d2598ace38b5730719faff..3314a9fea9e52471304996f251ab9093b8f2d4c9 100644 --- a/drivers/char/drm/i830_dma.c +++ b/drivers/char/drm/i830_dma.c @@ -114,7 +114,7 @@ static int i830_mmap_buffers(struct file *filp, struct vm_area_struct *vma) return 0; } -static struct file_operations i830_buffer_fops = { +static const struct file_operations i830_buffer_fops = { .open = drm_open, .release = drm_release, .ioctl = drm_ioctl, diff --git a/drivers/char/generic_nvram.c b/drivers/char/generic_nvram.c index 43ff59816511dddb6f8316c363dfeb39340e2400..2398e864c28d98ab3d11dfb64fe39b9485c1a103 100644 --- a/drivers/char/generic_nvram.c +++ b/drivers/char/generic_nvram.c @@ -117,7 +117,7 @@ static int nvram_ioctl(struct inode *inode, struct file *file, return 0; } -struct file_operations nvram_fops = { +const struct file_operations nvram_fops = { .owner = THIS_MODULE, .llseek = nvram_llseek, .read = read_nvram, diff --git a/drivers/char/mbcs.c b/drivers/char/mbcs.c index 0afb7ba999cf6b55cc03065c1fa58c12bf0cef67..57f9115a456cfd4b2443195a7fd67d545dd21318 100644 --- a/drivers/char/mbcs.c +++ b/drivers/char/mbcs.c @@ -46,7 +46,7 @@ LIST_HEAD(soft_list); /* * file operations */ -struct file_operations mbcs_ops = { +const struct file_operations mbcs_ops = { .open = mbcs_open, .llseek = mbcs_sram_llseek, .read = mbcs_sram_read, diff --git a/drivers/char/mspec.c b/drivers/char/mspec.c index 235e892261124d81c7c131e06f30bc4b713ad558..7ac30612068b674e742fb5577ed169148347f03f 100644 --- a/drivers/char/mspec.c +++ b/drivers/char/mspec.c @@ -291,7 +291,7 @@ uncached_mmap(struct file *file, struct vm_area_struct *vma) return mspec_mmap(file, vma, MSPEC_UNCACHED); } -static struct file_operations fetchop_fops = { +static const struct file_operations fetchop_fops = { .owner = THIS_MODULE, .mmap = fetchop_mmap }; @@ -302,7 +302,7 @@ static struct miscdevice fetchop_miscdev = { .fops = &fetchop_fops }; -static struct file_operations cached_fops = { +static const struct file_operations cached_fops = { .owner = THIS_MODULE, .mmap = cached_mmap }; @@ -313,7 +313,7 @@ static struct miscdevice cached_miscdev = { .fops = &cached_fops }; -static struct file_operations uncached_fops = { +static const struct file_operations uncached_fops = { .owner = THIS_MODULE, .mmap = uncached_mmap }; diff --git a/drivers/char/random.c b/drivers/char/random.c index 13d0b1350a62ed5fb579e727b623cb027e86610c..b9dc7aa1dfb31032b0d83dc5ad7dcb2d9f4cc7d6 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c @@ -1117,14 +1117,14 @@ random_ioctl(struct inode * inode, struct file * file, } } -struct file_operations random_fops = { +const struct file_operations random_fops = { .read = random_read, .write = random_write, .poll = random_poll, .ioctl = random_ioctl, }; -struct file_operations urandom_fops = { +const struct file_operations urandom_fops = { .read = urandom_read, .write = random_write, .ioctl = random_ioctl, diff --git a/drivers/char/tpm/tpm_bios.c b/drivers/char/tpm/tpm_bios.c index 7fca5f470bebf9109313b3e69a458cd6d8cf9003..4eba32b23b297c2f15bd942292c754bcc4d7708b 100644 --- a/drivers/char/tpm/tpm_bios.c +++ b/drivers/char/tpm/tpm_bios.c @@ -441,7 +441,7 @@ static int tpm_ascii_bios_measurements_open(struct inode *inode, return err; } -struct file_operations tpm_ascii_bios_measurements_ops = { +const struct file_operations tpm_ascii_bios_measurements_ops = { .open = tpm_ascii_bios_measurements_open, .read = seq_read, .llseek = seq_lseek, @@ -474,7 +474,7 @@ static int tpm_binary_bios_measurements_open(struct inode *inode, return err; } -struct file_operations tpm_binary_bios_measurements_ops = { +const struct file_operations tpm_binary_bios_measurements_ops = { .open = tpm_binary_bios_measurements_open, .read = seq_read, .llseek = seq_lseek, diff --git a/drivers/char/viotape.c b/drivers/char/viotape.c index 9438512b17f1d593d119753d0def60be2b536cda..13faf8d17482a58fdd3dcee95e33769f4bbb6b59 100644 --- a/drivers/char/viotape.c +++ b/drivers/char/viotape.c @@ -872,7 +872,7 @@ static int viotap_release(struct inode *inode, struct file *file) return ret; } -struct file_operations viotap_fops = { +const struct file_operations viotap_fops = { owner: THIS_MODULE, read: viotap_read, write: viotap_write, diff --git a/drivers/char/watchdog/iTCO_wdt.c b/drivers/char/watchdog/iTCO_wdt.c index 7eac922df8678cecbcde093a53f7da2d3c886257..fd8a44a08cd3604c07d70d8cd4cef8cd7f757cd9 100644 --- a/drivers/char/watchdog/iTCO_wdt.c +++ b/drivers/char/watchdog/iTCO_wdt.c @@ -539,7 +539,7 @@ static int iTCO_wdt_ioctl (struct inode *inode, struct file *file, * Kernel Interfaces */ -static struct file_operations iTCO_wdt_fops = { +static const struct file_operations iTCO_wdt_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .write = iTCO_wdt_write, diff --git a/drivers/char/watchdog/omap_wdt.c b/drivers/char/watchdog/omap_wdt.c index 6c6f97332dbb4ef076e2e917d4d0b1a50f3b4591..84074a697dce54dc2124aba8484f5efc969de594 100644 --- a/drivers/char/watchdog/omap_wdt.c +++ b/drivers/char/watchdog/omap_wdt.c @@ -230,7 +230,7 @@ omap_wdt_ioctl(struct inode *inode, struct file *file, } } -static struct file_operations omap_wdt_fops = { +static const struct file_operations omap_wdt_fops = { .owner = THIS_MODULE, .write = omap_wdt_write, .ioctl = omap_wdt_ioctl, diff --git a/drivers/char/watchdog/pc87413_wdt.c b/drivers/char/watchdog/pc87413_wdt.c index 1d447e32af419ed73eff046eff04e85a1e294eb5..a77a90717ad21cca1f2c553c4cbc2d3bac7f14ec 100644 --- a/drivers/char/watchdog/pc87413_wdt.c +++ b/drivers/char/watchdog/pc87413_wdt.c @@ -526,7 +526,7 @@ static int pc87413_notify_sys(struct notifier_block *this, /* -- Module's structures ---------------------------------------*/ -static struct file_operations pc87413_fops = { +static const struct file_operations pc87413_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .write = pc87413_write, diff --git a/drivers/char/watchdog/pnx4008_wdt.c b/drivers/char/watchdog/pnx4008_wdt.c index 3a55fc6abcd8fe3a7382111dbf24493c97a31a4d..ff6f1ca1e5e7119b48ace7d55843b0b6871367c6 100644 --- a/drivers/char/watchdog/pnx4008_wdt.c +++ b/drivers/char/watchdog/pnx4008_wdt.c @@ -238,7 +238,7 @@ static int pnx4008_wdt_release(struct inode *inode, struct file *file) return 0; } -static struct file_operations pnx4008_wdt_fops = { +static const struct file_operations pnx4008_wdt_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .write = pnx4008_wdt_write, diff --git a/drivers/char/watchdog/rm9k_wdt.c b/drivers/char/watchdog/rm9k_wdt.c index 7576a13e86bc062d4b0dd92cc7e0b60510354892..b4678839d3bbaf4ca7dbb7f17968a0944c712369 100644 --- a/drivers/char/watchdog/rm9k_wdt.c +++ b/drivers/char/watchdog/rm9k_wdt.c @@ -95,7 +95,7 @@ MODULE_PARM_DESC(nowayout, "Watchdog cannot be disabled once started"); /* Kernel interfaces */ -static struct file_operations fops = { +static const struct file_operations fops = { .owner = THIS_MODULE, .open = wdt_gpi_open, .release = wdt_gpi_release, diff --git a/drivers/char/watchdog/smsc37b787_wdt.c b/drivers/char/watchdog/smsc37b787_wdt.c index 9f56913b484ff42fea94800f5c7a0111d9d0bee2..a9681d580dd355dbb2753202fead86fec358e695 100644 --- a/drivers/char/watchdog/smsc37b787_wdt.c +++ b/drivers/char/watchdog/smsc37b787_wdt.c @@ -510,7 +510,7 @@ static int wb_smsc_wdt_notify_sys(struct notifier_block *this, unsigned long cod /* -- Module's structures ---------------------------------------*/ -static struct file_operations wb_smsc_wdt_fops = +static const struct file_operations wb_smsc_wdt_fops = { .owner = THIS_MODULE, .llseek = no_llseek, diff --git a/drivers/char/watchdog/w83697hf_wdt.c b/drivers/char/watchdog/w83697hf_wdt.c index 7768b55487c88e6bf50ba8248c416937b4c88f7d..c960ec110dd7c07c0464c840234f1f4957eb81da 100644 --- a/drivers/char/watchdog/w83697hf_wdt.c +++ b/drivers/char/watchdog/w83697hf_wdt.c @@ -323,7 +323,7 @@ wdt_notify_sys(struct notifier_block *this, unsigned long code, * Kernel Interfaces */ -static struct file_operations wdt_fops = { +static const struct file_operations wdt_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .write = wdt_write, diff --git a/drivers/i2c/chips/tps65010.c b/drivers/i2c/chips/tps65010.c index 4ee56def61f277cd019001dd9ffb434053f59f38..214fbb1423c5ba357adda0fa1cd14b1492aa5414 100644 --- a/drivers/i2c/chips/tps65010.c +++ b/drivers/i2c/chips/tps65010.c @@ -308,7 +308,7 @@ static int dbg_tps_open(struct inode *inode, struct file *file) return single_open(file, dbg_show, inode->i_private); } -static struct file_operations debug_fops = { +static const struct file_operations debug_fops = { .open = dbg_tps_open, .read = seq_read, .llseek = seq_lseek, diff --git a/drivers/i2c/i2c-dev.c b/drivers/i2c/i2c-dev.c index ac5bd2a7ca9906115c1380423d249d3f92adbe84..cb4fa9bef8cd5ef1602a3ddf9bc02d1557d5d744 100644 --- a/drivers/i2c/i2c-dev.c +++ b/drivers/i2c/i2c-dev.c @@ -392,7 +392,7 @@ static int i2cdev_release(struct inode *inode, struct file *file) return 0; } -static struct file_operations i2cdev_fops = { +static const struct file_operations i2cdev_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .read = i2cdev_read, diff --git a/drivers/ide/ide-proc.c b/drivers/ide/ide-proc.c index ad49bd823ebd11548696e43c66ee7392ac5a8306..30a5780f4185a7e6c4fe6ac65c79df25d822357c 100644 --- a/drivers/ide/ide-proc.c +++ b/drivers/ide/ide-proc.c @@ -548,7 +548,7 @@ static int ide_drivers_open(struct inode *inode, struct file *file) return single_open(file, &ide_drivers_show, NULL); } -static struct file_operations ide_drivers_operations = { +static const struct file_operations ide_drivers_operations = { .open = ide_drivers_open, .read = seq_read, .llseek = seq_lseek, diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index b3bcd1d7315e8780e6d74885a0d1f39862270162..c6eec0413a6c5f323bf67798554a6a794747773e 100644 --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c @@ -4779,7 +4779,7 @@ static ide_driver_t idetape_driver = { /* * Our character device supporting functions, passed to register_chrdev. */ -static struct file_operations idetape_fops = { +static const struct file_operations idetape_fops = { .owner = THIS_MODULE, .read = idetape_chrdev_read, .write = idetape_chrdev_write, diff --git a/drivers/ieee1394/dv1394.c b/drivers/ieee1394/dv1394.c index 55d6ae664fd621639815a6c06b266e4348a19cc3..dee9529aa8e7e3a742e1223fc4bd51d63f87c6fd 100644 --- a/drivers/ieee1394/dv1394.c +++ b/drivers/ieee1394/dv1394.c @@ -2147,7 +2147,7 @@ static void ir_tasklet_func(unsigned long data) } static struct cdev dv1394_cdev; -static struct file_operations dv1394_fops= +static const struct file_operations dv1394_fops= { .owner = THIS_MODULE, .poll = dv1394_poll, diff --git a/drivers/ieee1394/raw1394.c b/drivers/ieee1394/raw1394.c index a77a832828c84220d6d504c9be4d55101e5754ea..aa9ca8385ec769304e0bc928c51d52be92641aa6 100644 --- a/drivers/ieee1394/raw1394.c +++ b/drivers/ieee1394/raw1394.c @@ -3013,7 +3013,7 @@ static struct hpsb_highlevel raw1394_highlevel = { }; static struct cdev raw1394_cdev; -static struct file_operations raw1394_fops = { +static const struct file_operations raw1394_fops = { .owner = THIS_MODULE, .read = raw1394_read, .write = raw1394_write, diff --git a/drivers/ieee1394/video1394.c b/drivers/ieee1394/video1394.c index f4d1ec00af652372b1ed37a5a5ffa2401e5dc2d8..95ca26d7527297354021b2b18b2e89637c53dc7b 100644 --- a/drivers/ieee1394/video1394.c +++ b/drivers/ieee1394/video1394.c @@ -1277,7 +1277,7 @@ static long video1394_compat_ioctl(struct file *f, unsigned cmd, unsigned long a #endif static struct cdev video1394_cdev; -static struct file_operations video1394_fops= +static const struct file_operations video1394_fops= { .owner = THIS_MODULE, .unlocked_ioctl = video1394_ioctl, diff --git a/drivers/infiniband/core/ucm.c b/drivers/infiniband/core/ucm.c index f15220a0ee75dda635079975df75dfe406996d05..ee51d79a7ad5048ba97830934ad1961abf5b0376 100644 --- a/drivers/infiniband/core/ucm.c +++ b/drivers/infiniband/core/ucm.c @@ -1221,7 +1221,7 @@ static void ib_ucm_release_class_dev(struct class_device *class_dev) kfree(dev); } -static struct file_operations ucm_fops = { +static const struct file_operations ucm_fops = { .owner = THIS_MODULE, .open = ib_ucm_open, .release = ib_ucm_close, diff --git a/drivers/infiniband/core/ucma.c b/drivers/infiniband/core/ucma.c index e2e8d329b44389cd04230c55853db3f55f75a07b..6b81b98961c7b8014120cfd79cf939f478778e12 100644 --- a/drivers/infiniband/core/ucma.c +++ b/drivers/infiniband/core/ucma.c @@ -833,7 +833,7 @@ static int ucma_close(struct inode *inode, struct file *filp) return 0; } -static struct file_operations ucma_fops = { +static const struct file_operations ucma_fops = { .owner = THIS_MODULE, .open = ucma_open, .release = ucma_close, diff --git a/drivers/infiniband/core/user_mad.c b/drivers/infiniband/core/user_mad.c index 807fbd6b84140b99152aa52f978412827692bc5e..c069ebeba8e33c18746459830b05c61d8469bd45 100644 --- a/drivers/infiniband/core/user_mad.c +++ b/drivers/infiniband/core/user_mad.c @@ -771,7 +771,7 @@ static int ib_umad_close(struct inode *inode, struct file *filp) return 0; } -static struct file_operations umad_fops = { +static const struct file_operations umad_fops = { .owner = THIS_MODULE, .read = ib_umad_read, .write = ib_umad_write, @@ -846,7 +846,7 @@ static int ib_umad_sm_close(struct inode *inode, struct file *filp) return ret; } -static struct file_operations umad_sm_fops = { +static const struct file_operations umad_sm_fops = { .owner = THIS_MODULE, .open = ib_umad_sm_open, .release = ib_umad_sm_close diff --git a/drivers/infiniband/core/uverbs_main.c b/drivers/infiniband/core/uverbs_main.c index a617ca7b69236d8e2a35bfbec52bc4b0c55dc16e..f8bc822a3cc3cca4ab26249e48a639670e397636 100644 --- a/drivers/infiniband/core/uverbs_main.c +++ b/drivers/infiniband/core/uverbs_main.c @@ -375,7 +375,7 @@ static int ib_uverbs_event_close(struct inode *inode, struct file *filp) return 0; } -static struct file_operations uverbs_event_fops = { +static const struct file_operations uverbs_event_fops = { .owner = THIS_MODULE, .read = ib_uverbs_event_read, .poll = ib_uverbs_event_poll, @@ -679,14 +679,14 @@ static int ib_uverbs_close(struct inode *inode, struct file *filp) return 0; } -static struct file_operations uverbs_fops = { +static const struct file_operations uverbs_fops = { .owner = THIS_MODULE, .write = ib_uverbs_write, .open = ib_uverbs_open, .release = ib_uverbs_close }; -static struct file_operations uverbs_mmap_fops = { +static const struct file_operations uverbs_mmap_fops = { .owner = THIS_MODULE, .write = ib_uverbs_write, .mmap = ib_uverbs_mmap, diff --git a/drivers/infiniband/hw/ipath/ipath_diag.c b/drivers/infiniband/hw/ipath/ipath_diag.c index 28c087b824c2846c7d6e971e59359295618587b0..0f13a2182cc7d1bd0707058dc435f07343b2162f 100644 --- a/drivers/infiniband/hw/ipath/ipath_diag.c +++ b/drivers/infiniband/hw/ipath/ipath_diag.c @@ -59,7 +59,7 @@ static ssize_t ipath_diag_read(struct file *fp, char __user *data, static ssize_t ipath_diag_write(struct file *fp, const char __user *data, size_t count, loff_t *off); -static struct file_operations diag_file_ops = { +static const struct file_operations diag_file_ops = { .owner = THIS_MODULE, .write = ipath_diag_write, .read = ipath_diag_read, @@ -71,7 +71,7 @@ static ssize_t ipath_diagpkt_write(struct file *fp, const char __user *data, size_t count, loff_t *off); -static struct file_operations diagpkt_file_ops = { +static const struct file_operations diagpkt_file_ops = { .owner = THIS_MODULE, .write = ipath_diagpkt_write, }; diff --git a/drivers/infiniband/hw/ipath/ipath_file_ops.c b/drivers/infiniband/hw/ipath/ipath_file_ops.c index b932bcb67a5edc8a99420dfd80e34bc41e93559e..5d64ff87529715e439ecdd495e8a547bafef5059 100644 --- a/drivers/infiniband/hw/ipath/ipath_file_ops.c +++ b/drivers/infiniband/hw/ipath/ipath_file_ops.c @@ -54,7 +54,7 @@ static ssize_t ipath_write(struct file *, const char __user *, size_t, static unsigned int ipath_poll(struct file *, struct poll_table_struct *); static int ipath_mmap(struct file *, struct vm_area_struct *); -static struct file_operations ipath_file_ops = { +static const struct file_operations ipath_file_ops = { .owner = THIS_MODULE, .write = ipath_write, .open = ipath_open, @@ -2153,7 +2153,7 @@ static ssize_t ipath_write(struct file *fp, const char __user *data, static struct class *ipath_class; -static int init_cdev(int minor, char *name, struct file_operations *fops, +static int init_cdev(int minor, char *name, const struct file_operations *fops, struct cdev **cdevp, struct class_device **class_devp) { const dev_t dev = MKDEV(IPATH_MAJOR, minor); @@ -2210,7 +2210,7 @@ static int init_cdev(int minor, char *name, struct file_operations *fops, return ret; } -int ipath_cdev_init(int minor, char *name, struct file_operations *fops, +int ipath_cdev_init(int minor, char *name, const struct file_operations *fops, struct cdev **cdevp, struct class_device **class_devp) { return init_cdev(minor, name, fops, cdevp, class_devp); diff --git a/drivers/infiniband/hw/ipath/ipath_fs.c b/drivers/infiniband/hw/ipath/ipath_fs.c index 79a60f020a21a294938b0b6ca11ae13b532a1aee..5b40a846ff95490f61b93ce4d6f7a08d821570fa 100644 --- a/drivers/infiniband/hw/ipath/ipath_fs.c +++ b/drivers/infiniband/hw/ipath/ipath_fs.c @@ -47,7 +47,7 @@ static struct super_block *ipath_super; static int ipathfs_mknod(struct inode *dir, struct dentry *dentry, - int mode, struct file_operations *fops, + int mode, const struct file_operations *fops, void *data) { int error; @@ -81,7 +81,7 @@ static int ipathfs_mknod(struct inode *dir, struct dentry *dentry, static int create_file(const char *name, mode_t mode, struct dentry *parent, struct dentry **dentry, - struct file_operations *fops, void *data) + const struct file_operations *fops, void *data) { int error; @@ -105,7 +105,7 @@ static ssize_t atomic_stats_read(struct file *file, char __user *buf, sizeof ipath_stats); } -static struct file_operations atomic_stats_ops = { +static const struct file_operations atomic_stats_ops = { .read = atomic_stats_read, }; @@ -127,7 +127,7 @@ static ssize_t atomic_counters_read(struct file *file, char __user *buf, sizeof counters); } -static struct file_operations atomic_counters_ops = { +static const struct file_operations atomic_counters_ops = { .read = atomic_counters_read, }; @@ -166,7 +166,7 @@ static ssize_t atomic_node_info_read(struct file *file, char __user *buf, sizeof nodeinfo); } -static struct file_operations atomic_node_info_ops = { +static const struct file_operations atomic_node_info_ops = { .read = atomic_node_info_read, }; @@ -291,7 +291,7 @@ static ssize_t atomic_port_info_read(struct file *file, char __user *buf, sizeof portinfo); } -static struct file_operations atomic_port_info_ops = { +static const struct file_operations atomic_port_info_ops = { .read = atomic_port_info_read, }; @@ -394,7 +394,7 @@ static ssize_t flash_write(struct file *file, const char __user *buf, return ret; } -static struct file_operations flash_ops = { +static const struct file_operations flash_ops = { .read = flash_read, .write = flash_write, }; diff --git a/drivers/infiniband/hw/ipath/ipath_kernel.h b/drivers/infiniband/hw/ipath/ipath_kernel.h index 986b2125b8f5826cd4a1fd95b29014a373914f19..6d8d05fb5999e41a77552455c5492b0d30da6e18 100644 --- a/drivers/infiniband/hw/ipath/ipath_kernel.h +++ b/drivers/infiniband/hw/ipath/ipath_kernel.h @@ -593,7 +593,7 @@ void ipath_shutdown_device(struct ipath_devdata *); void ipath_disarm_senderrbufs(struct ipath_devdata *); struct file_operations; -int ipath_cdev_init(int minor, char *name, struct file_operations *fops, +int ipath_cdev_init(int minor, char *name, const struct file_operations *fops, struct cdev **cdevp, struct class_device **class_devp); void ipath_cdev_cleanup(struct cdev **cdevp, struct class_device **class_devp); diff --git a/drivers/infiniband/ulp/ipoib/ipoib_fs.c b/drivers/infiniband/ulp/ipoib/ipoib_fs.c index f1cb83688b318ef62d0cf6240019e23db74676f7..44c174182a829b39a53d80d72c3f38791f398bbc 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_fs.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_fs.c @@ -146,7 +146,7 @@ static int ipoib_mcg_open(struct inode *inode, struct file *file) return 0; } -static struct file_operations ipoib_mcg_fops = { +static const struct file_operations ipoib_mcg_fops = { .owner = THIS_MODULE, .open = ipoib_mcg_open, .read = seq_read, @@ -252,7 +252,7 @@ static int ipoib_path_open(struct inode *inode, struct file *file) return 0; } -static struct file_operations ipoib_path_fops = { +static const struct file_operations ipoib_path_fops = { .owner = THIS_MODULE, .open = ipoib_path_open, .read = seq_read, diff --git a/drivers/input/input.c b/drivers/input/input.c index 7cf2b4f603a36c278736b7e257e8318285ab2948..14d4c0493c36c7da7ec4a0b0c3e55162a2b3b72a 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c @@ -482,7 +482,7 @@ static int input_proc_devices_open(struct inode *inode, struct file *file) return seq_open(file, &input_devices_seq_ops); } -static struct file_operations input_devices_fileops = { +static const struct file_operations input_devices_fileops = { .owner = THIS_MODULE, .open = input_proc_devices_open, .poll = input_proc_devices_poll, @@ -533,7 +533,7 @@ static int input_proc_handlers_open(struct inode *inode, struct file *file) return seq_open(file, &input_handlers_seq_ops); } -static struct file_operations input_handlers_fileops = { +static const struct file_operations input_handlers_fileops = { .owner = THIS_MODULE, .open = input_proc_handlers_open, .read = seq_read, @@ -1142,7 +1142,7 @@ static int input_open_file(struct inode *inode, struct file *file) return err; } -static struct file_operations input_fops = { +static const struct file_operations input_fops = { .owner = THIS_MODULE, .open = input_open_file, }; diff --git a/drivers/input/misc/hp_sdc_rtc.c b/drivers/input/misc/hp_sdc_rtc.c index 31d5a13bfd6bb3a534b11918676fda5fb06112fe..ab76ea442fa56140a89d58df87cc934e1073ab2f 100644 --- a/drivers/input/misc/hp_sdc_rtc.c +++ b/drivers/input/misc/hp_sdc_rtc.c @@ -670,7 +670,7 @@ static int hp_sdc_rtc_ioctl(struct inode *inode, struct file *file, #endif } -static struct file_operations hp_sdc_rtc_fops = { +static const struct file_operations hp_sdc_rtc_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .read = hp_sdc_rtc_read, diff --git a/drivers/input/misc/uinput.c b/drivers/input/misc/uinput.c index 9516439b7c78837ed83ede2d6559c194b4aeb50e..42556232c52388f8d85b68ce596292a6a5fe5b64 100644 --- a/drivers/input/misc/uinput.c +++ b/drivers/input/misc/uinput.c @@ -627,7 +627,7 @@ static long uinput_ioctl(struct file *file, unsigned int cmd, unsigned long arg) return retval; } -static struct file_operations uinput_fops = { +static const struct file_operations uinput_fops = { .owner = THIS_MODULE, .open = uinput_open, .release = uinput_release, diff --git a/drivers/input/serio/serio_raw.c b/drivers/input/serio/serio_raw.c index 088ebc348ba31da45ddefa6b10a51aabf168185f..887357666c683f0337dfe8dfef3756fd3fe77ad2 100644 --- a/drivers/input/serio/serio_raw.c +++ b/drivers/input/serio/serio_raw.c @@ -234,7 +234,7 @@ static unsigned int serio_raw_poll(struct file *file, poll_table *wait) return 0; } -static struct file_operations serio_raw_fops = { +static const struct file_operations serio_raw_fops = { .owner = THIS_MODULE, .open = serio_raw_open, .release = serio_raw_release, diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c index 9e48bb5a3c095ebca55c8ef47517e277c60aa790..db1260f73f10e2aee4ea40dce75c09c62a79f570 100644 --- a/drivers/isdn/capi/capi.c +++ b/drivers/isdn/capi/capi.c @@ -1003,7 +1003,7 @@ capi_release(struct inode *inode, struct file *file) return 0; } -static struct file_operations capi_fops = +static const struct file_operations capi_fops = { .owner = THIS_MODULE, .llseek = no_llseek, diff --git a/drivers/isdn/capi/kcapi_proc.c b/drivers/isdn/capi/kcapi_proc.c index ca9dc00a45c4aedc9147c4c47877194000c1d36e..31f4fd8b8b0a563e4d058591befc095870725466 100644 --- a/drivers/isdn/capi/kcapi_proc.c +++ b/drivers/isdn/capi/kcapi_proc.c @@ -113,14 +113,14 @@ static int seq_contrstats_open(struct inode *inode, struct file *file) return seq_open(file, &seq_contrstats_ops); } -static struct file_operations proc_controller_ops = { +static const struct file_operations proc_controller_ops = { .open = seq_controller_open, .read = seq_read, .llseek = seq_lseek, .release = seq_release, }; -static struct file_operations proc_contrstats_ops = { +static const struct file_operations proc_contrstats_ops = { .open = seq_contrstats_open, .read = seq_read, .llseek = seq_lseek, @@ -218,14 +218,14 @@ seq_applstats_open(struct inode *inode, struct file *file) return seq_open(file, &seq_applstats_ops); } -static struct file_operations proc_applications_ops = { +static const struct file_operations proc_applications_ops = { .open = seq_applications_open, .read = seq_read, .llseek = seq_lseek, .release = seq_release, }; -static struct file_operations proc_applstats_ops = { +static const struct file_operations proc_applstats_ops = { .open = seq_applstats_open, .read = seq_read, .llseek = seq_lseek, @@ -302,7 +302,7 @@ seq_capi_driver_open(struct inode *inode, struct file *file) return err; } -static struct file_operations proc_driver_ops = { +static const struct file_operations proc_driver_ops = { .open = seq_capi_driver_open, .read = seq_read, .llseek = seq_lseek, diff --git a/drivers/isdn/divert/divert_procfs.c b/drivers/isdn/divert/divert_procfs.c index 06967da7c4a8fd0ee13ce94a8d46cfda8797051d..53a189003355b125b5bf9bb7cbd2b133d4ef9147 100644 --- a/drivers/isdn/divert/divert_procfs.c +++ b/drivers/isdn/divert/divert_procfs.c @@ -256,7 +256,7 @@ isdn_divert_ioctl(struct inode *inode, struct file *file, #ifdef CONFIG_PROC_FS -static struct file_operations isdn_fops = +static const struct file_operations isdn_fops = { .owner = THIS_MODULE, .llseek = no_llseek, diff --git a/drivers/isdn/hardware/eicon/divamnt.c b/drivers/isdn/hardware/eicon/divamnt.c index 77155d9f399bc1d1b46c2323ac4f6bedb48b30db..6b2940ed077692c66f030c761997d060403918c2 100644 --- a/drivers/isdn/hardware/eicon/divamnt.c +++ b/drivers/isdn/hardware/eicon/divamnt.c @@ -164,7 +164,7 @@ static ssize_t divas_maint_read(struct file *file, char __user *buf, return (maint_read_write(buf, (int) count)); } -static struct file_operations divas_maint_fops = { +static const struct file_operations divas_maint_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .read = divas_maint_read, diff --git a/drivers/isdn/hardware/eicon/divasi.c b/drivers/isdn/hardware/eicon/divasi.c index fff0d89c806b47a3a8be7736bd69719045837461..556b19615bc76e2e8a1a0cb7458687f7449370b0 100644 --- a/drivers/isdn/hardware/eicon/divasi.c +++ b/drivers/isdn/hardware/eicon/divasi.c @@ -131,7 +131,7 @@ static void remove_um_idi_proc(void) } } -static struct file_operations divas_idi_fops = { +static const struct file_operations divas_idi_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .read = um_idi_read, diff --git a/drivers/isdn/hardware/eicon/divasmain.c b/drivers/isdn/hardware/eicon/divasmain.c index 91fc92c01afe84930dc5bd5838a9db52ebb1c6d5..b365e44072c020970c00eb1572814b4b5b67e5cb 100644 --- a/drivers/isdn/hardware/eicon/divasmain.c +++ b/drivers/isdn/hardware/eicon/divasmain.c @@ -663,7 +663,7 @@ static unsigned int divas_poll(struct file *file, poll_table * wait) return (POLLIN | POLLRDNORM); } -static struct file_operations divas_fops = { +static const struct file_operations divas_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .read = divas_read, diff --git a/drivers/isdn/hardware/eicon/divasproc.c b/drivers/isdn/hardware/eicon/divasproc.c index 6a4373a4f1e8c7715a274eff93db299fdffa8970..0632a260699858cf7bc7a3036d366b34d888eed5 100644 --- a/drivers/isdn/hardware/eicon/divasproc.c +++ b/drivers/isdn/hardware/eicon/divasproc.c @@ -113,7 +113,7 @@ static int divas_close(struct inode *inode, struct file *file) return (0); } -static struct file_operations divas_fops = { +static const struct file_operations divas_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .read = divas_read, diff --git a/drivers/isdn/hysdn/hysdn_procconf.c b/drivers/isdn/hysdn/hysdn_procconf.c index 94a935089119b48d1d5f14e51ed195caeda1fc2a..dc477e0aab0ef15c4cf9df56e96405a166f6b8aa 100644 --- a/drivers/isdn/hysdn/hysdn_procconf.c +++ b/drivers/isdn/hysdn/hysdn_procconf.c @@ -367,7 +367,7 @@ hysdn_conf_close(struct inode *ino, struct file *filep) /******************************************************/ /* table for conf filesystem functions defined above. */ /******************************************************/ -static struct file_operations conf_fops = +static const struct file_operations conf_fops = { .llseek = no_llseek, .read = hysdn_conf_read, diff --git a/drivers/isdn/hysdn/hysdn_proclog.c b/drivers/isdn/hysdn/hysdn_proclog.c index 375d956884d73faa0c6168c56fa37748a0610dd9..f7e83a86f444cdb37d2bc18b3962212f1bf7a41c 100644 --- a/drivers/isdn/hysdn/hysdn_proclog.c +++ b/drivers/isdn/hysdn/hysdn_proclog.c @@ -383,7 +383,7 @@ hysdn_log_poll(struct file *file, poll_table * wait) /**************************************************/ /* table for log filesystem functions defined above. */ /**************************************************/ -static struct file_operations log_fops = +static const struct file_operations log_fops = { .llseek = no_llseek, .read = hysdn_log_read, diff --git a/drivers/isdn/i4l/isdn_common.c b/drivers/isdn/i4l/isdn_common.c index 6a2ef0a87ed9a5143ba61a396cd35bdfd4908f68..9c926e41b1140fc463ca448960a7bec233b14f70 100644 --- a/drivers/isdn/i4l/isdn_common.c +++ b/drivers/isdn/i4l/isdn_common.c @@ -1822,7 +1822,7 @@ isdn_close(struct inode *ino, struct file *filep) return 0; } -static struct file_operations isdn_fops = +static const struct file_operations isdn_fops = { .owner = THIS_MODULE, .llseek = no_llseek,