diff options
author | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2007-03-05 14:00:05 +0000 |
---|---|---|
committer | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2007-03-05 14:00:05 +0000 |
commit | 3660aa4b7b93436e16a36625b4c45346b0ab6f16 (patch) | |
tree | a423d96c06e8815e52e725b0892cc419f89fcb00 | |
parent | 12b8d19b315689013c443f572d9c51854f04c9de (diff) | |
download | xen-3660aa4b7b93436e16a36625b4c45346b0ab6f16.tar.gz xen-3660aa4b7b93436e16a36625b4c45346b0ab6f16.tar.bz2 xen-3660aa4b7b93436e16a36625b4c45346b0ab6f16.zip |
linux 2.6.18: constify instances of 'struct file_operations'
Signed-off-by: Jan Beulich <jbeulich@novell.com>
-rw-r--r-- | linux-2.6-xen-sparse/drivers/char/mem.c | 2 | ||||
-rw-r--r-- | linux-2.6-xen-sparse/drivers/xen/blktap/blktap.c | 2 | ||||
-rw-r--r-- | linux-2.6-xen-sparse/drivers/xen/char/mem.c | 2 | ||||
-rw-r--r-- | linux-2.6-xen-sparse/drivers/xen/evtchn/evtchn.c | 2 | ||||
-rw-r--r-- | linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c | 2 | ||||
-rw-r--r-- | linux-2.6-xen-sparse/drivers/xen/tpmback/tpmback.c | 2 | ||||
-rw-r--r-- | linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_dev.c | 2 | ||||
-rw-r--r-- | patches/linux-2.6.18/blktap-aio-16_03_06.patch | 10 |
8 files changed, 12 insertions, 12 deletions
diff --git a/linux-2.6-xen-sparse/drivers/char/mem.c b/linux-2.6-xen-sparse/drivers/char/mem.c index 9b7c774ff0..4bfcfb84ac 100644 --- a/linux-2.6-xen-sparse/drivers/char/mem.c +++ b/linux-2.6-xen-sparse/drivers/char/mem.c @@ -787,7 +787,7 @@ static const struct file_operations mem_fops = { .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 --git a/linux-2.6-xen-sparse/drivers/xen/blktap/blktap.c b/linux-2.6-xen-sparse/drivers/xen/blktap/blktap.c index 20b533a3ac..586de79f77 100644 --- a/linux-2.6-xen-sparse/drivers/xen/blktap/blktap.c +++ b/linux-2.6-xen-sparse/drivers/xen/blktap/blktap.c @@ -335,7 +335,7 @@ static int blktap_ioctl(struct inode *inode, struct file *filp, 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 --git a/linux-2.6-xen-sparse/drivers/xen/char/mem.c b/linux-2.6-xen-sparse/drivers/xen/char/mem.c index 62951fd7ff..4fba735afa 100644 --- a/linux-2.6-xen-sparse/drivers/xen/char/mem.c +++ b/linux-2.6-xen-sparse/drivers/xen/char/mem.c @@ -194,7 +194,7 @@ static int open_mem(struct inode * inode, struct file * filp) 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 --git a/linux-2.6-xen-sparse/drivers/xen/evtchn/evtchn.c b/linux-2.6-xen-sparse/drivers/xen/evtchn/evtchn.c index 4323b58fa8..12fea95050 100644 --- a/linux-2.6-xen-sparse/drivers/xen/evtchn/evtchn.c +++ b/linux-2.6-xen-sparse/drivers/xen/evtchn/evtchn.c @@ -406,7 +406,7 @@ static int evtchn_release(struct inode *inode, struct file *filp) 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 --git a/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c b/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c index 947510fa2d..46414068c1 100644 --- a/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c +++ b/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c @@ -248,7 +248,7 @@ static int privcmd_enforce_singleshot_mapping(struct vm_area_struct *vma) } #endif -static struct file_operations privcmd_file_ops = { +static const struct file_operations privcmd_file_ops = { .ioctl = privcmd_ioctl, .mmap = privcmd_mmap, }; diff --git a/linux-2.6-xen-sparse/drivers/xen/tpmback/tpmback.c b/linux-2.6-xen-sparse/drivers/xen/tpmback/tpmback.c index 701a5ad03e..662144ddde 100644 --- a/linux-2.6-xen-sparse/drivers/xen/tpmback/tpmback.c +++ b/linux-2.6-xen-sparse/drivers/xen/tpmback/tpmback.c @@ -629,7 +629,7 @@ static unsigned int vtpm_op_poll(struct file *file, 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 --git a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_dev.c b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_dev.c index a1e56ddb8d..6a81140af1 100644 --- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_dev.c +++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_dev.c @@ -354,7 +354,7 @@ static unsigned int xenbus_dev_poll(struct file *file, poll_table *wait) 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 --git a/patches/linux-2.6.18/blktap-aio-16_03_06.patch b/patches/linux-2.6.18/blktap-aio-16_03_06.patch index b0f2a81075..bb2aba6928 100644 --- a/patches/linux-2.6.18/blktap-aio-16_03_06.patch +++ b/patches/linux-2.6.18/blktap-aio-16_03_06.patch @@ -106,7 +106,7 @@ diff -pruN ../orig-linux-2.6.18/fs/aio.c ./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/eventpoll.c ./fs/eventpoll.c 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/eventpoll.c ./fs/eventpoll.c -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/eventpoll.c ./fs/eventpoll.c -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/linux/eventpoll.h ./include/linux/eventp + */ +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) {} |