Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 99ac48f5 authored by Arjan van de Ven's avatar Arjan van de Ven Committed by Linus Torvalds
Browse files

[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: default avatarArjan van de Ven <arjan@infradead.org>
Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent ec1b9466
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -103,7 +103,7 @@ spufs_setattr(struct dentry *dentry, struct iattr *attr)

static int
spufs_new_file(struct super_block *sb, struct dentry *dentry,
		struct file_operations *fops, int mode,
		const struct file_operations *fops, int mode,
		struct spu_context *ctx)
{
	static struct inode_operations spufs_file_iops = {
+1 −1
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@ static int ppc_htab_open(struct inode *inode, struct file *file)
	return single_open(file, ppc_htab_show, NULL);
}

struct file_operations ppc_htab_operations = {
const struct file_operations ppc_htab_operations = {
	.open		= ppc_htab_open,
	.read		= seq_read,
	.llseek		= seq_lseek,
+1 −1
Original line number Diff line number Diff line
@@ -175,7 +175,7 @@ int drm_stub_open(struct inode *inode, struct file *filp)
	drm_device_t *dev = NULL;
	int minor = iminor(inode);
	int err = -ENODEV;
	struct file_operations *old_fops;
	const struct file_operations *old_fops;

	DRM_DEBUG("\n");

+1 −1
Original line number Diff line number Diff line
@@ -126,7 +126,7 @@ static int i810_map_buffer(drm_buf_t * buf, struct file *filp)
	drm_device_t *dev = priv->head->dev;
	drm_i810_buf_priv_t *buf_priv = buf->dev_private;
	drm_i810_private_t *dev_priv = dev->dev_private;
	struct file_operations *old_fops;
	const struct file_operations *old_fops;
	int retcode = 0;

	if (buf_priv->currently_mapped == I810_BUF_MAPPED)
+1 −1
Original line number Diff line number Diff line
@@ -128,7 +128,7 @@ static int i830_map_buffer(drm_buf_t * buf, struct file *filp)
	drm_device_t *dev = priv->head->dev;
	drm_i830_buf_priv_t *buf_priv = buf->dev_private;
	drm_i830_private_t *dev_priv = dev->dev_private;
	struct file_operations *old_fops;
	const struct file_operations *old_fops;
	unsigned long virtual;
	int retcode = 0;

Loading