[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] linux 2.6.18: constify instances of 'struct file_operations'
# HG changeset patch # User kfraser@xxxxxxxxxxxxxxxxxxxxx # Date 1173103205 0 # Node ID 2caed72258e8ad786870f18a3d7216df9a9a3f8c # Parent bd66af1b5df2ae99b887fc4f0c9a8a22b9c198c6 linux 2.6.18: constify instances of 'struct file_operations' Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx> --- linux-2.6-xen-sparse/drivers/char/mem.c | 2 +- linux-2.6-xen-sparse/drivers/xen/blktap/blktap.c | 2 +- linux-2.6-xen-sparse/drivers/xen/char/mem.c | 2 +- linux-2.6-xen-sparse/drivers/xen/evtchn/evtchn.c | 2 +- linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c | 2 +- linux-2.6-xen-sparse/drivers/xen/tpmback/tpmback.c | 2 +- linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_dev.c | 2 +- patches/linux-2.6.18/blktap-aio-16_03_06.patch | 5 ----- 8 files changed, 7 insertions(+), 12 deletions(-) diff -r bd66af1b5df2 -r 2caed72258e8 linux-2.6-xen-sparse/drivers/char/mem.c --- a/linux-2.6-xen-sparse/drivers/char/mem.c Mon Mar 05 13:57:11 2007 +0000 +++ b/linux-2.6-xen-sparse/drivers/char/mem.c Mon Mar 05 14:00:05 2007 +0000 @@ -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 = { diff -r bd66af1b5df2 -r 2caed72258e8 linux-2.6-xen-sparse/drivers/xen/blktap/blktap.c --- a/linux-2.6-xen-sparse/drivers/xen/blktap/blktap.c Mon Mar 05 13:57:11 2007 +0000 +++ b/linux-2.6-xen-sparse/drivers/xen/blktap/blktap.c Mon Mar 05 14:00:05 2007 +0000 @@ -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, diff -r bd66af1b5df2 -r 2caed72258e8 linux-2.6-xen-sparse/drivers/xen/char/mem.c --- a/linux-2.6-xen-sparse/drivers/xen/char/mem.c Mon Mar 05 13:57:11 2007 +0000 +++ b/linux-2.6-xen-sparse/drivers/xen/char/mem.c Mon Mar 05 14:00:05 2007 +0000 @@ -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, diff -r bd66af1b5df2 -r 2caed72258e8 linux-2.6-xen-sparse/drivers/xen/evtchn/evtchn.c --- a/linux-2.6-xen-sparse/drivers/xen/evtchn/evtchn.c Mon Mar 05 13:57:11 2007 +0000 +++ b/linux-2.6-xen-sparse/drivers/xen/evtchn/evtchn.c Mon Mar 05 14:00:05 2007 +0000 @@ -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, diff -r bd66af1b5df2 -r 2caed72258e8 linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c --- a/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c Mon Mar 05 13:57:11 2007 +0000 +++ b/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c Mon Mar 05 14:00:05 2007 +0000 @@ -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, }; diff -r bd66af1b5df2 -r 2caed72258e8 linux-2.6-xen-sparse/drivers/xen/tpmback/tpmback.c --- a/linux-2.6-xen-sparse/drivers/xen/tpmback/tpmback.c Mon Mar 05 13:57:11 2007 +0000 +++ b/linux-2.6-xen-sparse/drivers/xen/tpmback/tpmback.c Mon Mar 05 14:00:05 2007 +0000 @@ -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, diff -r bd66af1b5df2 -r 2caed72258e8 linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_dev.c --- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_dev.c Mon Mar 05 13:57:11 2007 +0000 +++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_dev.c Mon Mar 05 14:00:05 2007 +0000 @@ -354,7 +354,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, diff -r bd66af1b5df2 -r 2caed72258e8 patches/linux-2.6.18/blktap-aio-16_03_06.patch --- a/patches/linux-2.6.18/blktap-aio-16_03_06.patch Mon Mar 05 13:57:11 2007 +0000 +++ b/patches/linux-2.6.18/blktap-aio-16_03_06.patch Mon Mar 05 14:00:05 2007 +0000 @@ -106,7 +106,7 @@ diff -pruN ../orig-linux-2.6.18/fs/aio.c + 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 @@ diff -pruN ../orig-linux-2.6.18/fs/event 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 @@ diff -pruN ../orig-linux-2.6.18/fs/event -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 @@ diff -pruN ../orig-linux-2.6.18/fs/event -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 @@ diff -pruN ../orig-linux-2.6.18/include/ + */ +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-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |