aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@infradead.org>2006-03-28 04:56:41 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-28 12:16:05 -0500
commit99ac48f54a91d02140c497edc31dc57d4bc5c85d (patch)
tree68719391694a6914191bdf73d2071875f7653f6f
parentec1b9466cb4f6ae6d950bd67055d9410d1056d2a (diff)
[PATCH] mark f_ops const in the inode
Mark the f_ops members of inodes as const, as well as fix the ripple-through this causes by places that copy this f_ops and then "do stuff" with it. Signed-off-by: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--arch/powerpc/platforms/cell/spufs/inode.c2
-rw-r--r--arch/ppc/kernel/ppc_htab.c2
-rw-r--r--drivers/char/drm/drm_fops.c2
-rw-r--r--drivers/char/drm/i810_dma.c2
-rw-r--r--drivers/char/drm/i830_dma.c2
-rw-r--r--drivers/char/mem.c2
-rw-r--r--drivers/char/misc.c2
-rw-r--r--drivers/input/input.c2
-rw-r--r--drivers/isdn/capi/kcapi_proc.c2
-rw-r--r--drivers/media/dvb/dvb-core/dvbdev.c2
-rw-r--r--drivers/media/video/videodev.c2
-rw-r--r--drivers/message/i2o/i2o_proc.c2
-rw-r--r--drivers/oprofile/oprofilefs.c6
-rw-r--r--drivers/telephony/phonedev.c2
-rw-r--r--drivers/usb/core/file.c6
-rw-r--r--drivers/usb/gadget/inode.c6
-rw-r--r--fs/char_dev.c4
-rw-r--r--fs/debugfs/inode.c2
-rw-r--r--fs/inode.c2
-rw-r--r--fs/nfsd/vfs.c2
-rw-r--r--fs/proc/generic.c2
-rw-r--r--fs/proc/internal.h2
-rw-r--r--fs/proc/proc_misc.c2
-rw-r--r--fs/select.c2
-rw-r--r--include/linux/cdev.h4
-rw-r--r--include/linux/debugfs.h2
-rw-r--r--include/linux/fs.h6
-rw-r--r--include/linux/input.h2
-rw-r--r--include/linux/miscdevice.h2
-rw-r--r--include/linux/oprofile.h4
-rw-r--r--include/linux/proc_fs.h4
-rw-r--r--include/linux/sound.h12
-rw-r--r--include/linux/sunrpc/stats.h4
-rw-r--r--include/linux/usb.h2
-rw-r--r--include/linux/videodev2.h2
-rw-r--r--include/sound/core.h6
-rw-r--r--net/sunrpc/rpc_pipe.c2
-rw-r--r--net/sunrpc/stats.c4
-rw-r--r--sound/core/init.c3
-rw-r--r--sound/core/sound.c4
-rw-r--r--sound/core/sound_oss.c2
-rw-r--r--sound/sound_core.c22
42 files changed, 75 insertions, 74 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c
index b3962c3a0348..5be40aa483fd 100644
--- a/arch/powerpc/platforms/cell/spufs/inode.c
+++ b/arch/powerpc/platforms/cell/spufs/inode.c
@@ -103,7 +103,7 @@ spufs_setattr(struct dentry *dentry, struct iattr *attr)
103 103
104static int 104static int
105spufs_new_file(struct super_block *sb, struct dentry *dentry, 105spufs_new_file(struct super_block *sb, struct dentry *dentry,
106 struct file_operations *fops, int mode, 106 const struct file_operations *fops, int mode,
107 struct spu_context *ctx) 107 struct spu_context *ctx)
108{ 108{
109 static struct inode_operations spufs_file_iops = { 109 static struct inode_operations spufs_file_iops = {
diff --git a/arch/ppc/kernel/ppc_htab.c b/arch/ppc/kernel/ppc_htab.c
index 2f5c7650274f..9b84bffdefce 100644
--- a/arch/ppc/kernel/ppc_htab.c
+++ b/arch/ppc/kernel/ppc_htab.c
@@ -52,7 +52,7 @@ static int ppc_htab_open(struct inode *inode, struct file *file)
52 return single_open(file, ppc_htab_show, NULL); 52 return single_open(file, ppc_htab_show, NULL);
53} 53}
54 54
55struct file_operations ppc_htab_operations = { 55const struct file_operations ppc_htab_operations = {
56 .open = ppc_htab_open, 56 .open = ppc_htab_open,
57 .read = seq_read, 57 .read = seq_read,
58 .llseek = seq_lseek, 58 .llseek = seq_lseek,
diff --git a/drivers/char/drm/drm_fops.c b/drivers/char/drm/drm_fops.c
index 641f7633878c..b7f7951c4587 100644
--- a/drivers/char/drm/drm_fops.c
+++ b/drivers/char/drm/drm_fops.c
@@ -175,7 +175,7 @@ int drm_stub_open(struct inode *inode, struct file *filp)
175 drm_device_t *dev = NULL; 175 drm_device_t *dev = NULL;
176 int minor = iminor(inode); 176 int minor = iminor(inode);
177 int err = -ENODEV; 177 int err = -ENODEV;
178 struct file_operations *old_fops; 178 const struct file_operations *old_fops;
179 179
180 DRM_DEBUG("\n"); 180 DRM_DEBUG("\n");
181 181
diff --git a/drivers/char/drm/i810_dma.c b/drivers/char/drm/i810_dma.c
index ae0aa6d7e0bb..c658dde3633b 100644
--- a/drivers/char/drm/i810_dma.c
+++ b/drivers/char/drm/i810_dma.c
@@ -126,7 +126,7 @@ static int i810_map_buffer(drm_buf_t * buf, struct file *filp)
126 drm_device_t *dev = priv->head->dev; 126 drm_device_t *dev = priv->head->dev;
127 drm_i810_buf_priv_t *buf_priv = buf->dev_private; 127 drm_i810_buf_priv_t *buf_priv = buf->dev_private;
128 drm_i810_private_t *dev_priv = dev->dev_private; 128 drm_i810_private_t *dev_priv = dev->dev_private;
129 struct file_operations *old_fops; 129 const struct file_operations *old_fops;
130 int retcode = 0; 130 int retcode = 0;
131 131
132 if (buf_priv->currently_mapped == I810_BUF_MAPPED) 132 if (buf_priv->currently_mapped == I810_BUF_MAPPED)
diff --git a/drivers/char/drm/i830_dma.c b/drivers/char/drm/i830_dma.c
index 163f2cbfe60d..b0f815d8cea8 100644
--- a/drivers/char/drm/i830_dma.c
+++ b/drivers/char/drm/i830_dma.c
@@ -128,7 +128,7 @@ static int i830_map_buffer(drm_buf_t * buf, struct file *filp)
128 drm_device_t *dev = priv->head->dev; 128 drm_device_t *dev = priv->head->dev;
129 drm_i830_buf_priv_t *buf_priv = buf->dev_private; 129 drm_i830_buf_priv_t *buf_priv = buf->dev_private;
130 drm_i830_private_t *dev_priv = dev->dev_private; 130 drm_i830_private_t *dev_priv = dev->dev_private;
131 struct file_operations *old_fops; 131 const struct file_operations *old_fops;
132 unsigned long virtual; 132 unsigned long virtual;
133 int retcode = 0; 133 int retcode = 0;
134 134
diff --git a/drivers/char/mem.c b/drivers/char/mem.c
index 5245ba1649ed..66719f9d294c 100644
--- a/drivers/char/mem.c
+++ b/drivers/char/mem.c
@@ -899,7 +899,7 @@ static const struct {
899 unsigned int minor; 899 unsigned int minor;
900 char *name; 900 char *name;
901 umode_t mode; 901 umode_t mode;
902 struct file_operations *fops; 902 const struct file_operations *fops;
903} devlist[] = { /* list of minor devices */ 903} devlist[] = { /* list of minor devices */
904 {1, "mem", S_IRUSR | S_IWUSR | S_IRGRP, &mem_fops}, 904 {1, "mem", S_IRUSR | S_IWUSR | S_IRGRP, &mem_fops},
905 {2, "kmem", S_IRUSR | S_IWUSR | S_IRGRP, &kmem_fops}, 905 {2, "kmem", S_IRUSR | S_IWUSR | S_IRGRP, &kmem_fops},
diff --git a/drivers/char/misc.c b/drivers/char/misc.c
index 3e4c0414a01a..96eb2a709e21 100644
--- a/drivers/char/misc.c
+++ b/drivers/char/misc.c
@@ -129,7 +129,7 @@ static int misc_open(struct inode * inode, struct file * file)
129 int minor = iminor(inode); 129 int minor = iminor(inode);
130 struct miscdevice *c; 130 struct miscdevice *c;
131 int err = -ENODEV; 131 int err = -ENODEV;
132 struct file_operations *old_fops, *new_fops = NULL; 132 const struct file_operations *old_fops, *new_fops = NULL;
133 133
134 down(&misc_sem); 134 down(&misc_sem);
135 135
diff --git a/drivers/input/input.c b/drivers/input/input.c
index 4fe3da3c667a..f8af0945964e 100644
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -923,7 +923,7 @@ void input_unregister_handler(struct input_handler *handler)
923static int input_open_file(struct inode *inode, struct file *file) 923static int input_open_file(struct inode *inode, struct file *file)
924{ 924{
925 struct input_handler *handler = input_table[iminor(inode) >> 5]; 925 struct input_handler *handler = input_table[iminor(inode) >> 5];
926 struct file_operations *old_fops, *new_fops = NULL; 926 const struct file_operations *old_fops, *new_fops = NULL;
927 int err; 927 int err;
928 928
929 /* No load-on-demand here? */ 929 /* No load-on-demand here? */
diff --git a/drivers/isdn/capi/kcapi_proc.c b/drivers/isdn/capi/kcapi_proc.c
index 2cc8b27e4c3b..ca9dc00a45c4 100644
--- a/drivers/isdn/capi/kcapi_proc.c
+++ b/drivers/isdn/capi/kcapi_proc.c
@@ -233,7 +233,7 @@ static struct file_operations proc_applstats_ops = {
233}; 233};
234 234
235static void 235static void
236create_seq_entry(char *name, mode_t mode, struct file_operations *f) 236create_seq_entry(char *name, mode_t mode, const struct file_operations *f)
237{ 237{
238 struct proc_dir_entry *entry; 238 struct proc_dir_entry *entry;
239 entry = create_proc_entry(name, mode, NULL); 239 entry = create_proc_entry(name, mode, NULL);
diff --git a/drivers/media/dvb/dvb-core/dvbdev.c b/drivers/media/dvb/dvb-core/dvbdev.c
index 54f8b95717b0..96fe0ecae250 100644
--- a/drivers/media/dvb/dvb-core/dvbdev.c
+++ b/drivers/media/dvb/dvb-core/dvbdev.c
@@ -86,7 +86,7 @@ static int dvb_device_open(struct inode *inode, struct file *file)
86 86
87 if (dvbdev && dvbdev->fops) { 87 if (dvbdev && dvbdev->fops) {
88 int err = 0; 88 int err = 0;
89 struct file_operations *old_fops; 89 const struct file_operations *old_fops;
90 90
91 file->private_data = dvbdev; 91 file->private_data = dvbdev;
92 old_fops = file->f_op; 92 old_fops = file->f_op;
diff --git a/drivers/media/video/videodev.c b/drivers/media/video/videodev.c
index 75e3d41382f2..5f87dd5f1d0b 100644
--- a/drivers/media/video/videodev.c
+++ b/drivers/media/video/videodev.c
@@ -97,7 +97,7 @@ static int video_open(struct inode *inode, struct file *file)
97 unsigned int minor = iminor(inode); 97 unsigned int minor = iminor(inode);
98 int err = 0; 98 int err = 0;
99 struct video_device *vfl; 99 struct video_device *vfl;
100 struct file_operations *old_fops; 100 const struct file_operations *old_fops;
101 101
102 if(minor>=VIDEO_NUM_DEVICES) 102 if(minor>=VIDEO_NUM_DEVICES)
103 return -ENODEV; 103 return -ENODEV;
diff --git a/drivers/message/i2o/i2o_proc.c b/drivers/message/i2o/i2o_proc.c
index 2a0c42b8cda5..3d2e76eea93e 100644
--- a/drivers/message/i2o/i2o_proc.c
+++ b/drivers/message/i2o/i2o_proc.c
@@ -56,7 +56,7 @@
56typedef struct _i2o_proc_entry_t { 56typedef struct _i2o_proc_entry_t {
57 char *name; /* entry name */ 57 char *name; /* entry name */
58 mode_t mode; /* mode */ 58 mode_t mode; /* mode */
59 struct file_operations *fops; /* open function */ 59 const struct file_operations *fops; /* open function */
60} i2o_proc_entry; 60} i2o_proc_entry;
61 61
62/* global I2O /proc/i2o entry */ 62/* global I2O /proc/i2o entry */
diff --git a/drivers/oprofile/oprofilefs.c b/drivers/oprofile/oprofilefs.c
index d6bae699749a..b62da9b0cbf0 100644
--- a/drivers/oprofile/oprofilefs.c
+++ b/drivers/oprofile/oprofilefs.c
@@ -130,7 +130,7 @@ static struct file_operations ulong_ro_fops = {
130 130
131 131
132static struct dentry * __oprofilefs_create_file(struct super_block * sb, 132static struct dentry * __oprofilefs_create_file(struct super_block * sb,
133 struct dentry * root, char const * name, struct file_operations * fops, 133 struct dentry * root, char const * name, const struct file_operations * fops,
134 int perm) 134 int perm)
135{ 135{
136 struct dentry * dentry; 136 struct dentry * dentry;
@@ -203,7 +203,7 @@ int oprofilefs_create_ro_atomic(struct super_block * sb, struct dentry * root,
203 203
204 204
205int oprofilefs_create_file(struct super_block * sb, struct dentry * root, 205int oprofilefs_create_file(struct super_block * sb, struct dentry * root,
206 char const * name, struct file_operations * fops) 206 char const * name, const struct file_operations * fops)
207{ 207{
208 if (!__oprofilefs_create_file(sb, root, name, fops, 0644)) 208 if (!__oprofilefs_create_file(sb, root, name, fops, 0644))
209 return -EFAULT; 209 return -EFAULT;
@@ -212,7 +212,7 @@ int oprofilefs_create_file(struct super_block * sb, struct dentry * root,
212 212
213 213
214int oprofilefs_create_file_perm(struct super_block * sb, struct dentry * root, 214int oprofilefs_create_file_perm(struct super_block * sb, struct dentry * root,
215 char const * name, struct file_operations * fops, int perm) 215 char const * name, const struct file_operations * fops, int perm)
216{ 216{
217 if (!__oprofilefs_create_file(sb, root, name, fops, perm)) 217 if (!__oprofilefs_create_file(sb, root, name, fops, perm))
218 return -EFAULT; 218 return -EFAULT;
diff --git a/drivers/telephony/phonedev.c b/drivers/telephony/phonedev.c
index 7a6db1c5c8c5..e166fffea86b 100644
--- a/drivers/telephony/phonedev.c
+++ b/drivers/telephony/phonedev.c
@@ -49,7 +49,7 @@ static int phone_open(struct inode *inode, struct file *file)
49 unsigned int minor = iminor(inode); 49 unsigned int minor = iminor(inode);
50 int err = 0; 50 int err = 0;
51 struct phone_device *p; 51 struct phone_device *p;
52 struct file_operations *old_fops, *new_fops = NULL; 52 const struct file_operations *old_fops, *new_fops = NULL;
53 53
54 if (minor >= PHONE_NUM_DEVICES) 54 if (minor >= PHONE_NUM_DEVICES)
55 return -ENODEV; 55 return -ENODEV;
diff --git a/drivers/usb/core/file.c b/drivers/usb/core/file.c
index 37b13368c814..b263a54a13c0 100644
--- a/drivers/usb/core/file.c
+++ b/drivers/usb/core/file.c
@@ -24,15 +24,15 @@
24#include "usb.h" 24#include "usb.h"
25 25
26#define MAX_USB_MINORS 256 26#define MAX_USB_MINORS 256
27static struct file_operations *usb_minors[MAX_USB_MINORS]; 27static const struct file_operations *usb_minors[MAX_USB_MINORS];
28static DEFINE_SPINLOCK(minor_lock); 28static DEFINE_SPINLOCK(minor_lock);
29 29
30static int usb_open(struct inode * inode, struct file * file) 30static int usb_open(struct inode * inode, struct file * file)
31{ 31{
32 int minor = iminor(inode); 32 int minor = iminor(inode);
33 struct file_operations *c; 33 const struct file_operations *c;
34 int err = -ENODEV; 34 int err = -ENODEV;
35 struct file_operations *old_fops, *new_fops = NULL; 35 const struct file_operations *old_fops, *new_fops = NULL;
36 36
37 spin_lock (&minor_lock); 37 spin_lock (&minor_lock);
38 c = usb_minors[minor]; 38 c = usb_minors[minor];
diff --git a/drivers/usb/gadget/inode.c b/drivers/usb/gadget/inode.c
index b44cfda76b61..3f618ce6998d 100644
--- a/drivers/usb/gadget/inode.c
+++ b/drivers/usb/gadget/inode.c
@@ -1581,7 +1581,7 @@ restart:
1581 1581
1582static struct inode * 1582static struct inode *
1583gadgetfs_create_file (struct super_block *sb, char const *name, 1583gadgetfs_create_file (struct super_block *sb, char const *name,
1584 void *data, struct file_operations *fops, 1584 void *data, const struct file_operations *fops,
1585 struct dentry **dentry_p); 1585 struct dentry **dentry_p);
1586 1586
1587static int activate_ep_files (struct dev_data *dev) 1587static int activate_ep_files (struct dev_data *dev)
@@ -1955,7 +1955,7 @@ module_param (default_perm, uint, 0644);
1955 1955
1956static struct inode * 1956static struct inode *
1957gadgetfs_make_inode (struct super_block *sb, 1957gadgetfs_make_inode (struct super_block *sb,
1958 void *data, struct file_operations *fops, 1958 void *data, const struct file_operations *fops,
1959 int mode) 1959 int mode)
1960{ 1960{
1961 struct inode *inode = new_inode (sb); 1961 struct inode *inode = new_inode (sb);
@@ -1979,7 +1979,7 @@ gadgetfs_make_inode (struct super_block *sb,
1979 */ 1979 */
1980static struct inode * 1980static struct inode *
1981gadgetfs_create_file (struct super_block *sb, char const *name, 1981gadgetfs_create_file (struct super_block *sb, char const *name,
1982 void *data, struct file_operations *fops, 1982 void *data, const struct file_operations *fops,
1983 struct dentry **dentry_p) 1983 struct dentry **dentry_p)
1984{ 1984{
1985 struct dentry *dentry; 1985 struct dentry *dentry;
diff --git a/fs/char_dev.c b/fs/char_dev.c
index 8c6eb04d31e2..b53dffa46bac 100644
--- a/fs/char_dev.c
+++ b/fs/char_dev.c
@@ -250,7 +250,7 @@ int alloc_chrdev_region(dev_t *dev, unsigned baseminor, unsigned count,
250} 250}
251 251
252int register_chrdev(unsigned int major, const char *name, 252int register_chrdev(unsigned int major, const char *name,
253 struct file_operations *fops) 253 const struct file_operations *fops)
254{ 254{
255 struct char_device_struct *cd; 255 struct char_device_struct *cd;
256 struct cdev *cdev; 256 struct cdev *cdev;
@@ -473,7 +473,7 @@ struct cdev *cdev_alloc(void)
473 return p; 473 return p;
474} 474}
475 475
476void cdev_init(struct cdev *cdev, struct file_operations *fops) 476void cdev_init(struct cdev *cdev, const struct file_operations *fops)
477{ 477{
478 memset(cdev, 0, sizeof *cdev); 478 memset(cdev, 0, sizeof *cdev);
479 INIT_LIST_HEAD(&cdev->list); 479 INIT_LIST_HEAD(&cdev->list);
diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c
index d4f1a2cddd47..85d166cdcae4 100644
--- a/fs/debugfs/inode.c
+++ b/fs/debugfs/inode.c
@@ -191,7 +191,7 @@ static int debugfs_create_by_name(const char *name, mode_t mode,
191 */ 191 */
192struct dentry *debugfs_create_file(const char *name, mode_t mode, 192struct dentry *debugfs_create_file(const char *name, mode_t mode,
193 struct dentry *parent, void *data, 193 struct dentry *parent, void *data,
194 struct file_operations *fops) 194 const struct file_operations *fops)
195{ 195{
196 struct dentry *dentry = NULL; 196 struct dentry *dentry = NULL;
197 int error; 197 int error;
diff --git a/fs/inode.c b/fs/inode.c
index 1fddf2803af8..32b7c3375021 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -104,7 +104,7 @@ static struct inode *alloc_inode(struct super_block *sb)
104{ 104{
105 static struct address_space_operations empty_aops; 105 static struct address_space_operations empty_aops;
106 static struct inode_operations empty_iops; 106 static struct inode_operations empty_iops;
107 static struct file_operations empty_fops; 107 static const struct file_operations empty_fops;
108 struct inode *inode; 108 struct inode *inode;
109 109
110 if (sb->s_op->alloc_inode) 110 if (sb->s_op->alloc_inode)
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
index 5320e5afaddb..31018333dc38 100644
--- a/fs/nfsd/vfs.c
+++ b/fs/nfsd/vfs.c
@@ -706,7 +706,7 @@ nfsd_close(struct file *filp)
706 * after it. 706 * after it.
707 */ 707 */
708static inline int nfsd_dosync(struct file *filp, struct dentry *dp, 708static inline int nfsd_dosync(struct file *filp, struct dentry *dp,
709 struct file_operations *fop) 709 const struct file_operations *fop)
710{ 710{
711 struct inode *inode = dp->d_inode; 711 struct inode *inode = dp->d_inode;
712 int (*fsync) (struct file *, struct dentry *, int); 712 int (*fsync) (struct file *, struct dentry *, int);
diff --git a/fs/proc/generic.c b/fs/proc/generic.c
index 47b7a20d45eb..4ba03009cf72 100644
--- a/fs/proc/generic.c
+++ b/fs/proc/generic.c
@@ -560,7 +560,7 @@ static void proc_kill_inodes(struct proc_dir_entry *de)
560 struct file * filp = list_entry(p, struct file, f_u.fu_list); 560 struct file * filp = list_entry(p, struct file, f_u.fu_list);
561 struct dentry * dentry = filp->f_dentry; 561 struct dentry * dentry = filp->f_dentry;
562 struct inode * inode; 562 struct inode * inode;
563 struct file_operations *fops; 563 const struct file_operations *fops;
564 564
565 if (dentry->d_op != &proc_dentry_operations) 565 if (dentry->d_op != &proc_dentry_operations)
566 continue; 566 continue;
diff --git a/fs/proc/internal.h b/fs/proc/internal.h
index 95a1cf32b838..0502f17b860d 100644
--- a/fs/proc/internal.h
+++ b/fs/proc/internal.h
@@ -30,7 +30,7 @@ do { \
30 30
31#endif 31#endif
32 32
33extern void create_seq_entry(char *name, mode_t mode, struct file_operations *f); 33extern void create_seq_entry(char *name, mode_t mode, const struct file_operations *f);
34extern int proc_exe_link(struct inode *, struct dentry **, struct vfsmount **); 34extern int proc_exe_link(struct inode *, struct dentry **, struct vfsmount **);
35extern int proc_tid_stat(struct task_struct *, char *); 35extern int proc_tid_stat(struct task_struct *, char *);
36extern int proc_tgid_stat(struct task_struct *, char *); 36extern int proc_tgid_stat(struct task_struct *, char *);
diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c
index 1edce0c34bfd..ef5a3323f4b5 100644
--- a/fs/proc/proc_misc.c
+++ b/fs/proc/proc_misc.c
@@ -731,7 +731,7 @@ static struct file_operations proc_sysrq_trigger_operations = {
731 731
732struct proc_dir_entry *proc_root_kcore; 732struct proc_dir_entry *proc_root_kcore;
733 733
734void create_seq_entry(char *name, mode_t mode, struct file_operations *f) 734void create_seq_entry(char *name, mode_t mode, const struct file_operations *f)
735{ 735{
736 struct proc_dir_entry *entry; 736 struct proc_dir_entry *entry;
737 entry = create_proc_entry(name, mode, NULL); 737 entry = create_proc_entry(name, mode, NULL);
diff --git a/fs/select.c b/fs/select.c
index 05cd199a1127..b3a3a1326af6 100644
--- a/fs/select.c
+++ b/fs/select.c
@@ -220,7 +220,7 @@ int do_select(int n, fd_set_bits *fds, s64 *timeout)
220 for (i = 0; i < n; ++rinp, ++routp, ++rexp) { 220 for (i = 0; i < n; ++rinp, ++routp, ++rexp) {
221 unsigned long in, out, ex, all_bits, bit = 1, mask, j; 221 unsigned long in, out, ex, all_bits, bit = 1, mask, j;
222 unsigned long res_in = 0, res_out = 0, res_ex = 0; 222 unsigned long res_in = 0, res_out = 0, res_ex = 0;
223 struct file_operations *f_op = NULL; 223 const struct file_operations *f_op = NULL;
224 struct file *file = NULL; 224 struct file *file = NULL;
225 225
226 in = *inp++; out = *outp++; ex = *exp++; 226 in = *inp++; out = *outp++; ex = *exp++;
diff --git a/include/linux/cdev.h b/include/linux/cdev.h
index 8da37e29cb87..2216638962d2 100644
--- a/include/linux/cdev.h
+++ b/include/linux/cdev.h
@@ -5,13 +5,13 @@
5struct cdev { 5struct cdev {
6 struct kobject kobj; 6 struct kobject kobj;
7 struct module *owner; 7 struct module *owner;
8 struct file_operations *ops; 8 const struct file_operations *ops;
9 struct list_head list; 9 struct list_head list;
10 dev_t dev; 10 dev_t dev;
11 unsigned int count; 11 unsigned int count;
12}; 12};
13 13
14void cdev_init(struct cdev *, struct file_operations *); 14void cdev_init(struct cdev *, const struct file_operations *);
15 15
16struct cdev *cdev_alloc(void); 16struct cdev *cdev_alloc(void);
17 17
diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h
index 4b0428e335be..176e2d371577 100644
--- a/include/linux/debugfs.h
+++ b/include/linux/debugfs.h
@@ -29,7 +29,7 @@ struct debugfs_blob_wrapper {
29#if defined(CONFIG_DEBUG_FS) 29#if defined(CONFIG_DEBUG_FS)
30struct dentry *debugfs_create_file(const char *name, mode_t mode, 30struct dentry *debugfs_create_file(const char *name, mode_t mode,
31 struct dentry *parent, void *data, 31 struct dentry *parent, void *data,
32 struct file_operations *fops); 32 const struct file_operations *fops);
33 33
34struct dentry *debugfs_create_dir(const char *name, struct dentry *parent); 34struct dentry *debugfs_create_dir(const char *name, struct dentry *parent);
35 35
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 680d913350e7..ef355bc73714 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -496,7 +496,7 @@ struct inode {
496 struct mutex i_mutex; 496 struct mutex i_mutex;
497 struct rw_semaphore i_alloc_sem; 497 struct rw_semaphore i_alloc_sem;
498 struct inode_operations *i_op; 498 struct inode_operations *i_op;
499 struct file_operations *i_fop; /* former ->i_op->default_file_ops */ 499 const struct file_operations *i_fop; /* former ->i_op->default_file_ops */
500 struct super_block *i_sb; 500 struct super_block *i_sb;
501 struct file_lock *i_flock; 501 struct file_lock *i_flock;
502 struct address_space *i_mapping; 502 struct address_space *i_mapping;
@@ -636,7 +636,7 @@ struct file {
636 } f_u; 636 } f_u;
637 struct dentry *f_dentry; 637 struct dentry *f_dentry;
638 struct vfsmount *f_vfsmnt; 638 struct vfsmount *f_vfsmnt;
639 struct file_operations *f_op; 639 const struct file_operations *f_op;
640 atomic_t f_count; 640 atomic_t f_count;
641 unsigned int f_flags; 641 unsigned int f_flags;
642 mode_t f_mode; 642 mode_t f_mode;
@@ -1414,7 +1414,7 @@ extern void bd_release_from_disk(struct block_device *, struct gendisk *);
1414extern int alloc_chrdev_region(dev_t *, unsigned, unsigned, const char *); 1414extern int alloc_chrdev_region(dev_t *, unsigned, unsigned, const char *);
1415extern int register_chrdev_region(dev_t, unsigned, const char *); 1415extern int register_chrdev_region(dev_t, unsigned, const char *);
1416extern int register_chrdev(unsigned int, const char *, 1416extern int register_chrdev(unsigned int, const char *,
1417 struct file_operations *); 1417 const struct file_operations *);
1418extern int unregister_chrdev(unsigned int, const char *); 1418extern int unregister_chrdev(unsigned int, const char *);
1419extern void unregister_chrdev_region(dev_t, unsigned); 1419extern void unregister_chrdev_region(dev_t, unsigned);
1420extern int chrdev_open(struct inode *, struct file *); 1420extern int chrdev_open(struct inode *, struct file *);
diff --git a/include/linux/input.h b/include/linux/input.h
index 6d4cc3c110d6..1d4e341b72e6 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -957,7 +957,7 @@ struct input_handler {
957 struct input_handle* (*connect)(struct input_handler *handler, struct input_dev *dev, struct input_device_id *id); 957 struct input_handle* (*connect)(struct input_handler *handler, struct input_dev *dev, struct input_device_id *id);
958 void (*disconnect)(struct input_handle *handle); 958 void (*disconnect)(struct input_handle *handle);
959 959
960 struct file_operations *fops; 960 const struct file_operations *fops;
961 int minor; 961 int minor;
962 char *name; 962 char *name;
963 963
diff --git a/include/linux/miscdevice.h b/include/linux/miscdevice.h
index 14ceebfc1efa..5b584dafb5a6 100644
--- a/include/linux/miscdevice.h
+++ b/include/linux/miscdevice.h
@@ -36,7 +36,7 @@ struct class_device;
36struct miscdevice { 36struct miscdevice {
37 int minor; 37 int minor;
38 const char *name; 38 const char *name;
39 struct file_operations *fops; 39 const struct file_operations *fops;
40 struct list_head list; 40 struct list_head list;
41 struct device *dev; 41 struct device *dev;
42 struct class_device *class; 42 struct class_device *class;
diff --git a/include/linux/oprofile.h b/include/linux/oprofile.h
index b5b3197dfd4f..0d514b252454 100644
--- a/include/linux/oprofile.h
+++ b/include/linux/oprofile.h
@@ -84,10 +84,10 @@ void oprofile_add_trace(unsigned long eip);
84 * the specified file operations. 84 * the specified file operations.
85 */ 85 */
86int oprofilefs_create_file(struct super_block * sb, struct dentry * root, 86int oprofilefs_create_file(struct super_block * sb, struct dentry * root,
87 char const * name, struct file_operations * fops); 87 char const * name, const struct file_operations * fops);
88 88
89int oprofilefs_create_file_perm(struct super_block * sb, struct dentry * root, 89int oprofilefs_create_file_perm(struct super_block * sb, struct dentry * root,
90 char const * name, struct file_operations * fops, int perm); 90 char const * name, const struct file_operations * fops, int perm);
91 91
92/** Create a file for read/write access to an unsigned long. */ 92/** Create a file for read/write access to an unsigned long. */
93int oprofilefs_create_ulong(struct super_block * sb, struct dentry * root, 93int oprofilefs_create_ulong(struct super_block * sb, struct dentry * root,
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
index cb224cf653b1..6d03d025fcd5 100644
--- a/include/linux/proc_fs.h
+++ b/include/linux/proc_fs.h
@@ -58,7 +58,7 @@ struct proc_dir_entry {
58 gid_t gid; 58 gid_t gid;
59 loff_t size; 59 loff_t size;
60 struct inode_operations * proc_iops; 60 struct inode_operations * proc_iops;
61 struct file_operations * proc_fops; 61 const struct file_operations * proc_fops;
62 get_info_t *get_info; 62 get_info_t *get_info;
63 struct module *owner; 63 struct module *owner;
64 struct proc_dir_entry *next, *parent, *subdir; 64 struct proc_dir_entry *next, *parent, *subdir;
@@ -189,7 +189,7 @@ static inline struct proc_dir_entry *proc_net_create(const char *name,
189} 189}
190 190
191static inline struct proc_dir_entry *proc_net_fops_create(const char *name, 191static inline struct proc_dir_entry *proc_net_fops_create(const char *name,
192 mode_t mode, struct file_operations *fops) 192 mode_t mode, const struct file_operations *fops)
193{ 193{
194 struct proc_dir_entry *res = create_proc_entry(name, mode, proc_net); 194 struct proc_dir_entry *res = create_proc_entry(name, mode, proc_net);
195 if (res) 195 if (res)
diff --git a/include/linux/sound.h b/include/linux/sound.h
index 72b9af4c3fd4..f63d8342ffa3 100644
--- a/include/linux/sound.h
+++ b/include/linux/sound.h
@@ -30,12 +30,12 @@
30 */ 30 */
31 31
32struct device; 32struct device;
33extern int register_sound_special(struct file_operations *fops, int unit); 33extern int register_sound_special(const struct file_operations *fops, int unit);
34extern int register_sound_special_device(struct file_operations *fops, int unit, struct device *dev); 34extern int register_sound_special_device(const struct file_operations *fops, int unit, struct device *dev);
35extern int register_sound_mixer(struct file_operations *fops, int dev); 35extern int register_sound_mixer(const struct file_operations *fops, int dev);
36extern int register_sound_midi(struct file_operations *fops, int dev); 36extern int register_sound_midi(const struct file_operations *fops, int dev);
37extern int register_sound_dsp(struct file_operations *fops, int dev); 37extern int register_sound_dsp(const struct file_operations *fops, int dev);
38extern int register_sound_synth(struct file_operations *fops, int dev); 38extern int register_sound_synth(const struct file_operations *fops, int dev);
39 39
40extern void unregister_sound_special(int unit); 40extern void unregister_sound_special(int unit);
41extern void unregister_sound_mixer(int unit); 41extern void unregister_sound_mixer(int unit);
diff --git a/include/linux/sunrpc/stats.h b/include/linux/sunrpc/stats.h
index 0d6ed3c8bdc4..d93c24b47f3f 100644
--- a/include/linux/sunrpc/stats.h
+++ b/include/linux/sunrpc/stats.h
@@ -50,7 +50,7 @@ struct proc_dir_entry * rpc_proc_register(struct rpc_stat *);
50void rpc_proc_unregister(const char *); 50void rpc_proc_unregister(const char *);
51void rpc_proc_zero(struct rpc_program *); 51void rpc_proc_zero(struct rpc_program *);
52struct proc_dir_entry * svc_proc_register(struct svc_stat *, 52struct proc_dir_entry * svc_proc_register(struct svc_stat *,
53 struct file_operations *); 53 const struct file_operations *);
54void svc_proc_unregister(const char *); 54void svc_proc_unregister(const char *);
55 55
56void svc_seq_show(struct seq_file *, 56void svc_seq_show(struct seq_file *,
@@ -65,7 +65,7 @@ static inline void rpc_proc_unregister(const char *p) {}
65static inline void rpc_proc_zero(struct rpc_program *p) {} 65static inline void rpc_proc_zero(struct rpc_program *p) {}
66 66
67static inline struct proc_dir_entry *svc_proc_register(struct svc_stat *s, 67static inline struct proc_dir_entry *svc_proc_register(struct svc_stat *s,
68 struct file_operations *f) { return NULL; } 68 const struct file_operations *f) { return NULL; }
69static inline void svc_proc_unregister(const char *p) {} 69static inline void svc_proc_unregister(const char *p) {}
70 70
71static inline void svc_seq_show(struct seq_file *seq, 71static inline void svc_seq_show(struct seq_file *seq,
diff --git a/include/linux/usb.h b/include/linux/usb.h
index 130d125fda12..e34e5e3dce52 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -615,7 +615,7 @@ extern struct bus_type usb_bus_type;
615 */ 615 */
616struct usb_class_driver { 616struct usb_class_driver {
617 char *name; 617 char *name;
618 struct file_operations *fops; 618 const struct file_operations *fops;
619 int minor_base; 619 int minor_base;
620}; 620};
621 621
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index 2275bfec5b68..af2d6155d3fe 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -75,7 +75,7 @@ struct video_device
75 int minor; 75 int minor;
76 76
77 /* device ops + callbacks */ 77 /* device ops + callbacks */
78 struct file_operations *fops; 78 const struct file_operations *fops;
79 void (*release)(struct video_device *vfd); 79 void (*release)(struct video_device *vfd);
80 80
81 81
diff --git a/include/sound/core.h b/include/sound/core.h
index 144bdc2f217f..7f32c12b4a0a 100644
--- a/include/sound/core.h
+++ b/include/sound/core.h
@@ -186,7 +186,7 @@ struct snd_minor {
186 int type; /* SNDRV_DEVICE_TYPE_XXX */ 186 int type; /* SNDRV_DEVICE_TYPE_XXX */
187 int card; /* card number */ 187 int card; /* card number */
188 int device; /* device number */ 188 int device; /* device number */
189 struct file_operations *f_ops; /* file operations */ 189 const struct file_operations *f_ops; /* file operations */
190 void *private_data; /* private data for f_ops->open */ 190 void *private_data; /* private data for f_ops->open */
191 char name[0]; /* device name (keep at the end of 191 char name[0]; /* device name (keep at the end of
192 structure) */ 192 structure) */
@@ -200,14 +200,14 @@ extern int snd_ecards_limit;
200void snd_request_card(int card); 200void snd_request_card(int card);
201 201
202int snd_register_device(int type, struct snd_card *card, int dev, 202int snd_register_device(int type, struct snd_card *card, int dev,
203 struct file_operations *f_ops, void *private_data, 203 const struct file_operations *f_ops, void *private_data,
204 const char *name); 204 const char *name);
205int snd_unregister_device(int type, struct snd_card *card, int dev); 205int snd_unregister_device(int type, struct snd_card *card, int dev);
206void *snd_lookup_minor_data(unsigned int minor, int type); 206void *snd_lookup_minor_data(unsigned int minor, int type);
207 207
208#ifdef CONFIG_SND_OSSEMUL 208#ifdef CONFIG_SND_OSSEMUL
209int snd_register_oss_device(int type, struct snd_card *card, int dev, 209int snd_register_oss_device(int type, struct snd_card *card, int dev,
210 struct file_operations *f_ops, void *private_data, 210 const struct file_operations *f_ops, void *private_data,
211 const char *name); 211 const char *name);
212int snd_unregister_oss_device(int type, struct snd_card *card, int dev); 212int snd_unregister_oss_device(int type, struct snd_card *card, int dev);
213void *snd_lookup_oss_minor_data(unsigned int minor, int type); 213void *snd_lookup_oss_minor_data(unsigned int minor, int type);
diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c
index aa4158be9900..cc673dd8433f 100644
--- a/net/sunrpc/rpc_pipe.c
+++ b/net/sunrpc/rpc_pipe.c
@@ -395,7 +395,7 @@ enum {
395 */ 395 */
396struct rpc_filelist { 396struct rpc_filelist {
397 char *name; 397 char *name;
398 struct file_operations *i_fop; 398 const struct file_operations *i_fop;
399 int mode; 399 int mode;
400}; 400};
401 401
diff --git a/net/sunrpc/stats.c b/net/sunrpc/stats.c
index 790941e8af4d..dea529666d69 100644
--- a/net/sunrpc/stats.c
+++ b/net/sunrpc/stats.c
@@ -225,7 +225,7 @@ EXPORT_SYMBOL(rpc_print_iostats);
225 * Register/unregister RPC proc files 225 * Register/unregister RPC proc files
226 */ 226 */
227static inline struct proc_dir_entry * 227static inline struct proc_dir_entry *
228do_register(const char *name, void *data, struct file_operations *fops) 228do_register(const char *name, void *data, const struct file_operations *fops)
229{ 229{
230 struct proc_dir_entry *ent; 230 struct proc_dir_entry *ent;
231 231
@@ -253,7 +253,7 @@ rpc_proc_unregister(const char *name)
253} 253}
254 254
255struct proc_dir_entry * 255struct proc_dir_entry *
256svc_proc_register(struct svc_stat *statp, struct file_operations *fops) 256svc_proc_register(struct svc_stat *statp, const struct file_operations *fops)
257{ 257{
258 return do_register(statp->program->pg_name, statp, fops); 258 return do_register(statp->program->pg_name, statp, fops);
259} 259}
diff --git a/sound/core/init.c b/sound/core/init.c
index ad68761abba1..5bb8a8b23d51 100644
--- a/sound/core/init.c
+++ b/sound/core/init.c
@@ -223,7 +223,8 @@ int snd_card_disconnect(struct snd_card *card)
223 struct snd_monitor_file *mfile; 223 struct snd_monitor_file *mfile;
224 struct file *file; 224 struct file *file;
225 struct snd_shutdown_f_ops *s_f_ops; 225 struct snd_shutdown_f_ops *s_f_ops;
226 struct file_operations *f_ops, *old_f_ops; 226 struct file_operations *f_ops;
227 const struct file_operations *old_f_ops;
227 int err; 228 int err;
228 229
229 spin_lock(&card->files_lock); 230 spin_lock(&card->files_lock);
diff --git a/sound/core/sound.c b/sound/core/sound.c
index 4d28e5212611..108e430b5036 100644
--- a/sound/core/sound.c
+++ b/sound/core/sound.c
@@ -137,7 +137,7 @@ static int snd_open(struct inode *inode, struct file *file)
137{ 137{
138 unsigned int minor = iminor(inode); 138 unsigned int minor = iminor(inode);
139 struct snd_minor *mptr = NULL; 139 struct snd_minor *mptr = NULL;
140 struct file_operations *old_fops; 140 const struct file_operations *old_fops;
141 int err = 0; 141 int err = 0;
142 142
143 if (minor >= ARRAY_SIZE(snd_minors)) 143 if (minor >= ARRAY_SIZE(snd_minors))
@@ -240,7 +240,7 @@ static int snd_kernel_minor(int type, struct snd_card *card, int dev)
240 * Retrurns zero if successful, or a negative error code on failure. 240 * Retrurns zero if successful, or a negative error code on failure.
241 */ 241 */
242int snd_register_device(int type, struct snd_card *card, int dev, 242int snd_register_device(int type, struct snd_card *card, int dev,
243 struct file_operations *f_ops, void *private_data, 243 const struct file_operations *f_ops, void *private_data,
244 const char *name) 244 const char *name)
245{ 245{
246 int minor; 246 int minor;
diff --git a/sound/core/sound_oss.c b/sound/core/sound_oss.c
index 4023d3b406de..9055c6de9587 100644
--- a/sound/core/sound_oss.c
+++ b/sound/core/sound_oss.c
@@ -95,7 +95,7 @@ static int snd_oss_kernel_minor(int type, struct snd_card *card, int dev)
95} 95}
96 96
97int snd_register_oss_device(int type, struct snd_card *card, int dev, 97int snd_register_oss_device(int type, struct snd_card *card, int dev,
98 struct file_operations *f_ops, void *private_data, 98 const struct file_operations *f_ops, void *private_data,
99 const char *name) 99 const char *name)
100{ 100{
101 int minor = snd_oss_kernel_minor(type, card, dev); 101 int minor = snd_oss_kernel_minor(type, card, dev);
diff --git a/sound/sound_core.c b/sound/sound_core.c
index 394b53e20cb8..6f849720aef3 100644
--- a/sound/sound_core.c
+++ b/sound/sound_core.c
@@ -53,7 +53,7 @@
53struct sound_unit 53struct sound_unit
54{ 54{
55 int unit_minor; 55 int unit_minor;
56 struct file_operations *unit_fops; 56 const struct file_operations *unit_fops;
57 struct sound_unit *next; 57 struct sound_unit *next;
58 char name[32]; 58 char name[32];
59}; 59};
@@ -73,7 +73,7 @@ EXPORT_SYMBOL(sound_class);
73 * join into it. Called with the lock asserted 73 * join into it. Called with the lock asserted
74 */ 74 */
75 75
76static int __sound_insert_unit(struct sound_unit * s, struct sound_unit **list, struct file_operations *fops, int index, int low, int top) 76static int __sound_insert_unit(struct sound_unit * s, struct sound_unit **list, const struct file_operations *fops, int index, int low, int top)
77{ 77{
78 int n=low; 78 int n=low;
79 79
@@ -153,7 +153,7 @@ static DEFINE_SPINLOCK(sound_loader_lock);
153 * list. Acquires locks as needed 153 * list. Acquires locks as needed
154 */ 154 */
155 155
156static int sound_insert_unit(struct sound_unit **list, struct file_operations *fops, int index, int low, int top, const char *name, umode_t mode, struct device *dev) 156static int sound_insert_unit(struct sound_unit **list, const struct file_operations *fops, int index, int low, int top, const char *name, umode_t mode, struct device *dev)
157{ 157{
158 struct sound_unit *s = kmalloc(sizeof(*s), GFP_KERNEL); 158 struct sound_unit *s = kmalloc(sizeof(*s), GFP_KERNEL);
159 int r; 159 int r;
@@ -237,7 +237,7 @@ static struct sound_unit *chains[SOUND_STEP];
237 * a negative error code is returned. 237 * a negative error code is returned.
238 */ 238 */
239 239
240int register_sound_special_device(struct file_operations *fops, int unit, 240int register_sound_special_device(const struct file_operations *fops, int unit,
241 struct device *dev) 241 struct device *dev)
242{ 242{
243 const int chain = unit % SOUND_STEP; 243 const int chain = unit % SOUND_STEP;
@@ -301,7 +301,7 @@ int register_sound_special_device(struct file_operations *fops, int unit,
301 301
302EXPORT_SYMBOL(register_sound_special_device); 302EXPORT_SYMBOL(register_sound_special_device);
303 303
304int register_sound_special(struct file_operations *fops, int unit) 304int register_sound_special(const struct file_operations *fops, int unit)
305{ 305{
306 return register_sound_special_device(fops, unit, NULL); 306 return register_sound_special_device(fops, unit, NULL);
307} 307}
@@ -318,7 +318,7 @@ EXPORT_SYMBOL(register_sound_special);
318 * number is returned, on failure a negative error code is returned. 318 * number is returned, on failure a negative error code is returned.
319 */ 319 */
320 320
321int register_sound_mixer(struct file_operations *fops, int dev) 321int register_sound_mixer(const struct file_operations *fops, int dev)
322{ 322{
323 return sound_insert_unit(&chains[0], fops, dev, 0, 128, 323 return sound_insert_unit(&chains[0], fops, dev, 0, 128,
324 "mixer", S_IRUSR | S_IWUSR, NULL); 324 "mixer", S_IRUSR | S_IWUSR, NULL);
@@ -336,7 +336,7 @@ EXPORT_SYMBOL(register_sound_mixer);
336 * number is returned, on failure a negative error code is returned. 336 * number is returned, on failure a negative error code is returned.
337 */ 337 */
338 338
339int register_sound_midi(struct file_operations *fops, int dev) 339int register_sound_midi(const struct file_operations *fops, int dev)
340{ 340{
341 return sound_insert_unit(&chains[2], fops, dev, 2, 130, 341 return sound_insert_unit(&chains[2], fops, dev, 2, 130,
342 "midi", S_IRUSR | S_IWUSR, NULL); 342 "midi", S_IRUSR | S_IWUSR, NULL);
@@ -362,7 +362,7 @@ EXPORT_SYMBOL(register_sound_midi);
362 * and will always allocate them as a matching pair - eg dsp3/audio3 362 * and will always allocate them as a matching pair - eg dsp3/audio3
363 */ 363 */
364 364
365int register_sound_dsp(struct file_operations *fops, int dev) 365int register_sound_dsp(const struct file_operations *fops, int dev)
366{ 366{
367 return sound_insert_unit(&chains[3], fops, dev, 3, 131, 367 return sound_insert_unit(&chains[3], fops, dev, 3, 131,
368 "dsp", S_IWUSR | S_IRUSR, NULL); 368 "dsp", S_IWUSR | S_IRUSR, NULL);
@@ -381,7 +381,7 @@ EXPORT_SYMBOL(register_sound_dsp);
381 */ 381 */
382 382
383 383
384int register_sound_synth(struct file_operations *fops, int dev) 384int register_sound_synth(const struct file_operations *fops, int dev)
385{ 385{
386 return sound_insert_unit(&chains[9], fops, dev, 9, 137, 386 return sound_insert_unit(&chains[9], fops, dev, 9, 137,
387 "synth", S_IRUSR | S_IWUSR, NULL); 387 "synth", S_IRUSR | S_IWUSR, NULL);
@@ -501,7 +501,7 @@ int soundcore_open(struct inode *inode, struct file *file)
501 int chain; 501 int chain;
502 int unit = iminor(inode); 502 int unit = iminor(inode);
503 struct sound_unit *s; 503 struct sound_unit *s;
504 struct file_operations *new_fops = NULL; 504 const struct file_operations *new_fops = NULL;
505 505
506 chain=unit&0x0F; 506 chain=unit&0x0F;
507 if(chain==4 || chain==5) /* dsp/audio/dsp16 */ 507 if(chain==4 || chain==5) /* dsp/audio/dsp16 */
@@ -540,7 +540,7 @@ int soundcore_open(struct inode *inode, struct file *file)
540 * switching ->f_op in the first place. 540 * switching ->f_op in the first place.
541 */ 541 */
542 int err = 0; 542 int err = 0;
543 struct file_operations *old_fops = file->f_op; 543 const struct file_operations *old_fops = file->f_op;
544 file->f_op = new_fops; 544 file->f_op = new_fops;
545 spin_unlock(&sound_loader_lock); 545 spin_unlock(&sound_loader_lock);
546 if(file->f_op->open) 546 if(file->f_op->open)