[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 3/10] linux 2.6.18: constify instances of 'struct file_operations'
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx> Index: head-2007-02-27/drivers/char/mem.c =================================================================== --- head-2007-02-27.orig/drivers/char/mem.c 2007-03-05 10:00:18.000000000 +0100 +++ head-2007-02-27/drivers/char/mem.c 2007-02-27 16:27:37.000000000 +0100 @@ -787,7 +787,7 @@ static const struct file_operations mem_ .open = open_mem, }; #else -extern struct file_operations mem_fops; +extern const struct file_operations mem_fops; #endif static const struct file_operations kmem_fops = { Index: head-2007-02-27/drivers/xen/blktap/blktap.c =================================================================== --- head-2007-02-27.orig/drivers/xen/blktap/blktap.c 2007-03-05 10:00:18.000000000 +0100 +++ head-2007-02-27/drivers/xen/blktap/blktap.c 2007-02-27 16:27:37.000000000 +0100 @@ -335,7 +335,7 @@ static int blktap_ioctl(struct inode *in unsigned int cmd, unsigned long arg); static unsigned int blktap_poll(struct file *file, poll_table *wait); -static struct file_operations blktap_fops = { +static const struct file_operations blktap_fops = { .owner = THIS_MODULE, .poll = blktap_poll, .ioctl = blktap_ioctl, Index: head-2007-02-27/drivers/xen/char/mem.c =================================================================== --- head-2007-02-27.orig/drivers/xen/char/mem.c 2007-03-05 10:00:18.000000000 +0100 +++ head-2007-02-27/drivers/xen/char/mem.c 2007-02-27 16:27:37.000000000 +0100 @@ -194,7 +194,7 @@ static int open_mem(struct inode * inode return capable(CAP_SYS_RAWIO) ? 0 : -EPERM; } -struct file_operations mem_fops = { +const struct file_operations mem_fops = { .llseek = memory_lseek, .read = read_mem, .write = write_mem, Index: head-2007-02-27/drivers/xen/evtchn/evtchn.c =================================================================== --- head-2007-02-27.orig/drivers/xen/evtchn/evtchn.c 2007-03-05 10:00:18.000000000 +0100 +++ head-2007-02-27/drivers/xen/evtchn/evtchn.c 2007-02-27 16:27:37.000000000 +0100 @@ -406,7 +406,7 @@ static int evtchn_release(struct inode * return 0; } -static struct file_operations evtchn_fops = { +static const struct file_operations evtchn_fops = { .owner = THIS_MODULE, .read = evtchn_read, .write = evtchn_write, Index: head-2007-02-27/drivers/xen/privcmd/privcmd.c =================================================================== --- head-2007-02-27.orig/drivers/xen/privcmd/privcmd.c 2007-03-05 10:00:18.000000000 +0100 +++ head-2007-02-27/drivers/xen/privcmd/privcmd.c 2007-02-27 16:27:37.000000000 +0100 @@ -248,7 +248,7 @@ static int privcmd_enforce_singleshot_ma } #endif -static struct file_operations privcmd_file_ops = { +static const struct file_operations privcmd_file_ops = { .ioctl = privcmd_ioctl, .mmap = privcmd_mmap, }; Index: head-2007-02-27/drivers/xen/tpmback/tpmback.c =================================================================== --- head-2007-02-27.orig/drivers/xen/tpmback/tpmback.c 2007-03-05 10:00:18.000000000 +0100 +++ head-2007-02-27/drivers/xen/tpmback/tpmback.c 2007-02-27 16:27:37.000000000 +0100 @@ -629,7 +629,7 @@ static unsigned int vtpm_op_poll(struct return flags; } -static struct file_operations vtpm_ops = { +static const struct file_operations vtpm_ops = { .owner = THIS_MODULE, .llseek = no_llseek, .open = vtpm_op_open, Index: head-2007-02-27/drivers/xen/xenbus/xenbus_dev.c =================================================================== --- head-2007-02-27.orig/drivers/xen/xenbus/xenbus_dev.c 2007-03-05 10:00:18.000000000 +0100 +++ head-2007-02-27/drivers/xen/xenbus/xenbus_dev.c 2007-02-27 16:27:37.000000000 +0100 @@ -342,7 +342,7 @@ static unsigned int xenbus_dev_poll(stru return 0; } -static struct file_operations xenbus_dev_file_ops = { +static const struct file_operations xenbus_dev_file_ops = { .read = xenbus_dev_read, .write = xenbus_dev_write, .open = xenbus_dev_open, Index: head-2007-02-27/../patches/linux-2.6.18/blktap-aio-16_03_06.patch =================================================================== --- head-2007-02-27.orig/../patches/linux-2.6.18/blktap-aio-16_03_06.patch +++ head-2007-02-27/../patches/linux-2.6.18/blktap-aio-16_03_06.patch @@ -106,7 +106,7 @@ static unsigned int aio_queue_fd_poll(st + return pollflags; +} + -+static struct file_operations aioq_fops = { ++static const struct file_operations aioq_fops = { + .release = aio_queue_fd_close, + .poll = aio_queue_fd_poll +}; @@ -201,7 +201,7 @@ static int ep_events_transfer(struct eve int maxevents, long timeout); static int eventpollfs_delete_dentry(struct dentry *dentry); -static struct inode *ep_eventpoll_inode(void); -+static struct inode *ep_eventpoll_inode(struct file_operations *fops); ++static struct inode *ep_eventpoll_inode(const struct file_operations *fops); static int eventpollfs_get_sb(struct file_system_type *fs_type, int flags, const char *dev_name, void *data, struct vfsmount *mnt); @@ -221,7 +221,7 @@ asmlinkage long sys_epoll_pwait(int epfd -static int ep_getfd(int *efd, struct inode **einode, struct file **efile, - struct eventpoll *ep) +int ep_getfd(int *efd, struct inode **einode, struct file **efile, -+ struct eventpoll *ep, struct file_operations *fops) ++ struct eventpoll *ep, const struct file_operations *fops) { struct qstr this; char name[32]; @@ -248,7 +248,7 @@ static int eventpollfs_delete_dentry(str -static struct inode *ep_eventpoll_inode(void) -+static struct inode *ep_eventpoll_inode(struct file_operations *fops) ++static struct inode *ep_eventpoll_inode(const struct file_operations *fops) { int error = -ENOMEM; struct inode *inode = new_inode(eventpoll_mnt->mnt_sb); @@ -288,7 +288,7 @@ static inline void eventpoll_release(str + */ +struct eventpoll; +int ep_getfd(int *efd, struct inode **einode, struct file **efile, -+ struct eventpoll *ep, struct file_operations *fops); ++ struct eventpoll *ep, const struct file_operations *fops); #else static inline void eventpoll_init_file(struct file *file) {} _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |