diff options
Diffstat (limited to 'drivers/infiniband/hw/ipath')
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_diag.c | 4 | ||||
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_file_ops.c | 6 | ||||
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_fs.c | 14 | ||||
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_kernel.h | 2 |
4 files changed, 13 insertions, 13 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_diag.c b/drivers/infiniband/hw/ipath/ipath_diag.c index 28c087b824c2..0f13a2182cc7 100644 --- a/drivers/infiniband/hw/ipath/ipath_diag.c +++ b/drivers/infiniband/hw/ipath/ipath_diag.c | |||
@@ -59,7 +59,7 @@ static ssize_t ipath_diag_read(struct file *fp, char __user *data, | |||
59 | static ssize_t ipath_diag_write(struct file *fp, const char __user *data, | 59 | static ssize_t ipath_diag_write(struct file *fp, const char __user *data, |
60 | size_t count, loff_t *off); | 60 | size_t count, loff_t *off); |
61 | 61 | ||
62 | static struct file_operations diag_file_ops = { | 62 | static const struct file_operations diag_file_ops = { |
63 | .owner = THIS_MODULE, | 63 | .owner = THIS_MODULE, |
64 | .write = ipath_diag_write, | 64 | .write = ipath_diag_write, |
65 | .read = ipath_diag_read, | 65 | .read = ipath_diag_read, |
@@ -71,7 +71,7 @@ static ssize_t ipath_diagpkt_write(struct file *fp, | |||
71 | const char __user *data, | 71 | const char __user *data, |
72 | size_t count, loff_t *off); | 72 | size_t count, loff_t *off); |
73 | 73 | ||
74 | static struct file_operations diagpkt_file_ops = { | 74 | static const struct file_operations diagpkt_file_ops = { |
75 | .owner = THIS_MODULE, | 75 | .owner = THIS_MODULE, |
76 | .write = ipath_diagpkt_write, | 76 | .write = ipath_diagpkt_write, |
77 | }; | 77 | }; |
diff --git a/drivers/infiniband/hw/ipath/ipath_file_ops.c b/drivers/infiniband/hw/ipath/ipath_file_ops.c index b932bcb67a5e..5d64ff875297 100644 --- a/drivers/infiniband/hw/ipath/ipath_file_ops.c +++ b/drivers/infiniband/hw/ipath/ipath_file_ops.c | |||
@@ -54,7 +54,7 @@ static ssize_t ipath_write(struct file *, const char __user *, size_t, | |||
54 | static unsigned int ipath_poll(struct file *, struct poll_table_struct *); | 54 | static unsigned int ipath_poll(struct file *, struct poll_table_struct *); |
55 | static int ipath_mmap(struct file *, struct vm_area_struct *); | 55 | static int ipath_mmap(struct file *, struct vm_area_struct *); |
56 | 56 | ||
57 | static struct file_operations ipath_file_ops = { | 57 | static const struct file_operations ipath_file_ops = { |
58 | .owner = THIS_MODULE, | 58 | .owner = THIS_MODULE, |
59 | .write = ipath_write, | 59 | .write = ipath_write, |
60 | .open = ipath_open, | 60 | .open = ipath_open, |
@@ -2153,7 +2153,7 @@ bail: | |||
2153 | 2153 | ||
2154 | static struct class *ipath_class; | 2154 | static struct class *ipath_class; |
2155 | 2155 | ||
2156 | static int init_cdev(int minor, char *name, struct file_operations *fops, | 2156 | static int init_cdev(int minor, char *name, const struct file_operations *fops, |
2157 | struct cdev **cdevp, struct class_device **class_devp) | 2157 | struct cdev **cdevp, struct class_device **class_devp) |
2158 | { | 2158 | { |
2159 | const dev_t dev = MKDEV(IPATH_MAJOR, minor); | 2159 | const dev_t dev = MKDEV(IPATH_MAJOR, minor); |
@@ -2210,7 +2210,7 @@ done: | |||
2210 | return ret; | 2210 | return ret; |
2211 | } | 2211 | } |
2212 | 2212 | ||
2213 | int ipath_cdev_init(int minor, char *name, struct file_operations *fops, | 2213 | int ipath_cdev_init(int minor, char *name, const struct file_operations *fops, |
2214 | struct cdev **cdevp, struct class_device **class_devp) | 2214 | struct cdev **cdevp, struct class_device **class_devp) |
2215 | { | 2215 | { |
2216 | return init_cdev(minor, name, fops, cdevp, class_devp); | 2216 | return init_cdev(minor, name, fops, cdevp, class_devp); |
diff --git a/drivers/infiniband/hw/ipath/ipath_fs.c b/drivers/infiniband/hw/ipath/ipath_fs.c index 79a60f020a21..5b40a846ff95 100644 --- a/drivers/infiniband/hw/ipath/ipath_fs.c +++ b/drivers/infiniband/hw/ipath/ipath_fs.c | |||
@@ -47,7 +47,7 @@ | |||
47 | static struct super_block *ipath_super; | 47 | static struct super_block *ipath_super; |
48 | 48 | ||
49 | static int ipathfs_mknod(struct inode *dir, struct dentry *dentry, | 49 | static int ipathfs_mknod(struct inode *dir, struct dentry *dentry, |
50 | int mode, struct file_operations *fops, | 50 | int mode, const struct file_operations *fops, |
51 | void *data) | 51 | void *data) |
52 | { | 52 | { |
53 | int error; | 53 | int error; |
@@ -81,7 +81,7 @@ bail: | |||
81 | 81 | ||
82 | static int create_file(const char *name, mode_t mode, | 82 | static int create_file(const char *name, mode_t mode, |
83 | struct dentry *parent, struct dentry **dentry, | 83 | struct dentry *parent, struct dentry **dentry, |
84 | struct file_operations *fops, void *data) | 84 | const struct file_operations *fops, void *data) |
85 | { | 85 | { |
86 | int error; | 86 | int error; |
87 | 87 | ||
@@ -105,7 +105,7 @@ static ssize_t atomic_stats_read(struct file *file, char __user *buf, | |||
105 | sizeof ipath_stats); | 105 | sizeof ipath_stats); |
106 | } | 106 | } |
107 | 107 | ||
108 | static struct file_operations atomic_stats_ops = { | 108 | static const struct file_operations atomic_stats_ops = { |
109 | .read = atomic_stats_read, | 109 | .read = atomic_stats_read, |
110 | }; | 110 | }; |
111 | 111 | ||
@@ -127,7 +127,7 @@ static ssize_t atomic_counters_read(struct file *file, char __user *buf, | |||
127 | sizeof counters); | 127 | sizeof counters); |
128 | } | 128 | } |
129 | 129 | ||
130 | static struct file_operations atomic_counters_ops = { | 130 | static const struct file_operations atomic_counters_ops = { |
131 | .read = atomic_counters_read, | 131 | .read = atomic_counters_read, |
132 | }; | 132 | }; |
133 | 133 | ||
@@ -166,7 +166,7 @@ static ssize_t atomic_node_info_read(struct file *file, char __user *buf, | |||
166 | sizeof nodeinfo); | 166 | sizeof nodeinfo); |
167 | } | 167 | } |
168 | 168 | ||
169 | static struct file_operations atomic_node_info_ops = { | 169 | static const struct file_operations atomic_node_info_ops = { |
170 | .read = atomic_node_info_read, | 170 | .read = atomic_node_info_read, |
171 | }; | 171 | }; |
172 | 172 | ||
@@ -291,7 +291,7 @@ static ssize_t atomic_port_info_read(struct file *file, char __user *buf, | |||
291 | sizeof portinfo); | 291 | sizeof portinfo); |
292 | } | 292 | } |
293 | 293 | ||
294 | static struct file_operations atomic_port_info_ops = { | 294 | static const struct file_operations atomic_port_info_ops = { |
295 | .read = atomic_port_info_read, | 295 | .read = atomic_port_info_read, |
296 | }; | 296 | }; |
297 | 297 | ||
@@ -394,7 +394,7 @@ bail: | |||
394 | return ret; | 394 | return ret; |
395 | } | 395 | } |
396 | 396 | ||
397 | static struct file_operations flash_ops = { | 397 | static const struct file_operations flash_ops = { |
398 | .read = flash_read, | 398 | .read = flash_read, |
399 | .write = flash_write, | 399 | .write = flash_write, |
400 | }; | 400 | }; |
diff --git a/drivers/infiniband/hw/ipath/ipath_kernel.h b/drivers/infiniband/hw/ipath/ipath_kernel.h index 986b2125b8f5..6d8d05fb5999 100644 --- a/drivers/infiniband/hw/ipath/ipath_kernel.h +++ b/drivers/infiniband/hw/ipath/ipath_kernel.h | |||
@@ -593,7 +593,7 @@ void ipath_shutdown_device(struct ipath_devdata *); | |||
593 | void ipath_disarm_senderrbufs(struct ipath_devdata *); | 593 | void ipath_disarm_senderrbufs(struct ipath_devdata *); |
594 | 594 | ||
595 | struct file_operations; | 595 | struct file_operations; |
596 | int ipath_cdev_init(int minor, char *name, struct file_operations *fops, | 596 | int ipath_cdev_init(int minor, char *name, const struct file_operations *fops, |
597 | struct cdev **cdevp, struct class_device **class_devp); | 597 | struct cdev **cdevp, struct class_device **class_devp); |
598 | void ipath_cdev_cleanup(struct cdev **cdevp, | 598 | void ipath_cdev_cleanup(struct cdev **cdevp, |
599 | struct class_device **class_devp); | 599 | struct class_device **class_devp); |