ia64/xen-unstable

changeset 14257:2caed72258e8

linux 2.6.18: constify instances of 'struct file_operations'
Signed-off-by: Jan Beulich <jbeulich@novell.com>
author kfraser@localhost.localdomain
date Mon Mar 05 14:00:05 2007 +0000 (2007-03-05)
parents bd66af1b5df2
children d99e6b6c294d
files linux-2.6-xen-sparse/drivers/char/mem.c linux-2.6-xen-sparse/drivers/xen/blktap/blktap.c linux-2.6-xen-sparse/drivers/xen/char/mem.c linux-2.6-xen-sparse/drivers/xen/evtchn/evtchn.c linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c linux-2.6-xen-sparse/drivers/xen/tpmback/tpmback.c linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_dev.c patches/linux-2.6.18/blktap-aio-16_03_06.patch
line diff
     1.1 --- a/linux-2.6-xen-sparse/drivers/char/mem.c	Mon Mar 05 13:57:11 2007 +0000
     1.2 +++ b/linux-2.6-xen-sparse/drivers/char/mem.c	Mon Mar 05 14:00:05 2007 +0000
     1.3 @@ -787,7 +787,7 @@ static const struct file_operations mem_
     1.4  	.open		= open_mem,
     1.5  };
     1.6  #else
     1.7 -extern struct file_operations mem_fops;
     1.8 +extern const struct file_operations mem_fops;
     1.9  #endif
    1.10  
    1.11  static const struct file_operations kmem_fops = {
     2.1 --- a/linux-2.6-xen-sparse/drivers/xen/blktap/blktap.c	Mon Mar 05 13:57:11 2007 +0000
     2.2 +++ b/linux-2.6-xen-sparse/drivers/xen/blktap/blktap.c	Mon Mar 05 14:00:05 2007 +0000
     2.3 @@ -335,7 +335,7 @@ static int blktap_ioctl(struct inode *in
     2.4                          unsigned int cmd, unsigned long arg);
     2.5  static unsigned int blktap_poll(struct file *file, poll_table *wait);
     2.6  
     2.7 -static struct file_operations blktap_fops = {
     2.8 +static const struct file_operations blktap_fops = {
     2.9  	.owner   = THIS_MODULE,
    2.10  	.poll    = blktap_poll,
    2.11  	.ioctl   = blktap_ioctl,
     3.1 --- a/linux-2.6-xen-sparse/drivers/xen/char/mem.c	Mon Mar 05 13:57:11 2007 +0000
     3.2 +++ b/linux-2.6-xen-sparse/drivers/xen/char/mem.c	Mon Mar 05 14:00:05 2007 +0000
     3.3 @@ -194,7 +194,7 @@ static int open_mem(struct inode * inode
     3.4  	return capable(CAP_SYS_RAWIO) ? 0 : -EPERM;
     3.5  }
     3.6  
     3.7 -struct file_operations mem_fops = {
     3.8 +const struct file_operations mem_fops = {
     3.9  	.llseek		= memory_lseek,
    3.10  	.read		= read_mem,
    3.11  	.write		= write_mem,
     4.1 --- a/linux-2.6-xen-sparse/drivers/xen/evtchn/evtchn.c	Mon Mar 05 13:57:11 2007 +0000
     4.2 +++ b/linux-2.6-xen-sparse/drivers/xen/evtchn/evtchn.c	Mon Mar 05 14:00:05 2007 +0000
     4.3 @@ -406,7 +406,7 @@ static int evtchn_release(struct inode *
     4.4  	return 0;
     4.5  }
     4.6  
     4.7 -static struct file_operations evtchn_fops = {
     4.8 +static const struct file_operations evtchn_fops = {
     4.9  	.owner   = THIS_MODULE,
    4.10  	.read    = evtchn_read,
    4.11  	.write   = evtchn_write,
     5.1 --- a/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c	Mon Mar 05 13:57:11 2007 +0000
     5.2 +++ b/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c	Mon Mar 05 14:00:05 2007 +0000
     5.3 @@ -248,7 +248,7 @@ static int privcmd_enforce_singleshot_ma
     5.4  }
     5.5  #endif
     5.6  
     5.7 -static struct file_operations privcmd_file_ops = {
     5.8 +static const struct file_operations privcmd_file_ops = {
     5.9  	.ioctl = privcmd_ioctl,
    5.10  	.mmap  = privcmd_mmap,
    5.11  };
     6.1 --- a/linux-2.6-xen-sparse/drivers/xen/tpmback/tpmback.c	Mon Mar 05 13:57:11 2007 +0000
     6.2 +++ b/linux-2.6-xen-sparse/drivers/xen/tpmback/tpmback.c	Mon Mar 05 14:00:05 2007 +0000
     6.3 @@ -629,7 +629,7 @@ static unsigned int vtpm_op_poll(struct 
     6.4  	return flags;
     6.5  }
     6.6  
     6.7 -static struct file_operations vtpm_ops = {
     6.8 +static const struct file_operations vtpm_ops = {
     6.9  	.owner = THIS_MODULE,
    6.10  	.llseek = no_llseek,
    6.11  	.open = vtpm_op_open,
     7.1 --- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_dev.c	Mon Mar 05 13:57:11 2007 +0000
     7.2 +++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_dev.c	Mon Mar 05 14:00:05 2007 +0000
     7.3 @@ -354,7 +354,7 @@ static unsigned int xenbus_dev_poll(stru
     7.4  	return 0;
     7.5  }
     7.6  
     7.7 -static struct file_operations xenbus_dev_file_ops = {
     7.8 +static const struct file_operations xenbus_dev_file_ops = {
     7.9  	.read = xenbus_dev_read,
    7.10  	.write = xenbus_dev_write,
    7.11  	.open = xenbus_dev_open,
     8.1 --- a/patches/linux-2.6.18/blktap-aio-16_03_06.patch	Mon Mar 05 13:57:11 2007 +0000
     8.2 +++ b/patches/linux-2.6.18/blktap-aio-16_03_06.patch	Mon Mar 05 14:00:05 2007 +0000
     8.3 @@ -106,7 +106,7 @@ diff -pruN ../orig-linux-2.6.18/fs/aio.c
     8.4  +	return pollflags;
     8.5  +}
     8.6  +
     8.7 -+static struct file_operations aioq_fops = {
     8.8 ++static const struct file_operations aioq_fops = {
     8.9  +	.release	= aio_queue_fd_close,
    8.10  +	.poll		= aio_queue_fd_poll
    8.11  +};
    8.12 @@ -201,7 +201,7 @@ diff -pruN ../orig-linux-2.6.18/fs/event
    8.13   		   int maxevents, long timeout);
    8.14   static int eventpollfs_delete_dentry(struct dentry *dentry);
    8.15  -static struct inode *ep_eventpoll_inode(void);
    8.16 -+static struct inode *ep_eventpoll_inode(struct file_operations *fops);
    8.17 ++static struct inode *ep_eventpoll_inode(const struct file_operations *fops);
    8.18   static int eventpollfs_get_sb(struct file_system_type *fs_type,
    8.19   			      int flags, const char *dev_name,
    8.20   			      void *data, struct vfsmount *mnt);
    8.21 @@ -221,7 +221,7 @@ diff -pruN ../orig-linux-2.6.18/fs/event
    8.22  -static int ep_getfd(int *efd, struct inode **einode, struct file **efile,
    8.23  -		    struct eventpoll *ep)
    8.24  +int ep_getfd(int *efd, struct inode **einode, struct file **efile,
    8.25 -+		    struct eventpoll *ep, struct file_operations *fops)
    8.26 ++		    struct eventpoll *ep, const struct file_operations *fops)
    8.27   {
    8.28   	struct qstr this;
    8.29   	char name[32];
    8.30 @@ -248,7 +248,7 @@ diff -pruN ../orig-linux-2.6.18/fs/event
    8.31   
    8.32   
    8.33  -static struct inode *ep_eventpoll_inode(void)
    8.34 -+static struct inode *ep_eventpoll_inode(struct file_operations *fops)
    8.35 ++static struct inode *ep_eventpoll_inode(const struct file_operations *fops)
    8.36   {
    8.37   	int error = -ENOMEM;
    8.38   	struct inode *inode = new_inode(eventpoll_mnt->mnt_sb);
    8.39 @@ -288,7 +288,7 @@ diff -pruN ../orig-linux-2.6.18/include/
    8.40  + */
    8.41  +struct eventpoll;
    8.42  +int ep_getfd(int *efd, struct inode **einode, struct file **efile,
    8.43 -+             struct eventpoll *ep, struct file_operations *fops);
    8.44 ++             struct eventpoll *ep, const struct file_operations *fops);
    8.45   #else
    8.46   
    8.47   static inline void eventpoll_init_file(struct file *file) {}