提交 4d187a88 编写于 作者: J Jan Engelhardt 提交者: Artem Bityutskiy

UBI: constify file operations

Signed-off-by: NJan Engelhardt <jengelh@medozas.de>
Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
上级 ade44ce0
...@@ -1025,20 +1025,20 @@ static int ctrl_cdev_ioctl(struct inode *inode, struct file *file, ...@@ -1025,20 +1025,20 @@ static int ctrl_cdev_ioctl(struct inode *inode, struct file *file,
} }
/* UBI control character device operations */ /* UBI control character device operations */
struct file_operations ubi_ctrl_cdev_operations = { const struct file_operations ubi_ctrl_cdev_operations = {
.ioctl = ctrl_cdev_ioctl, .ioctl = ctrl_cdev_ioctl,
.owner = THIS_MODULE, .owner = THIS_MODULE,
}; };
/* UBI character device operations */ /* UBI character device operations */
struct file_operations ubi_cdev_operations = { const struct file_operations ubi_cdev_operations = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.ioctl = ubi_cdev_ioctl, .ioctl = ubi_cdev_ioctl,
.llseek = no_llseek, .llseek = no_llseek,
}; };
/* UBI volume character device operations */ /* UBI volume character device operations */
struct file_operations ubi_vol_cdev_operations = { const struct file_operations ubi_vol_cdev_operations = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.open = vol_cdev_open, .open = vol_cdev_open,
.release = vol_cdev_release, .release = vol_cdev_release,
......
...@@ -449,9 +449,9 @@ struct ubi_device { ...@@ -449,9 +449,9 @@ struct ubi_device {
}; };
extern struct kmem_cache *ubi_wl_entry_slab; extern struct kmem_cache *ubi_wl_entry_slab;
extern struct file_operations ubi_ctrl_cdev_operations; extern const struct file_operations ubi_ctrl_cdev_operations;
extern struct file_operations ubi_cdev_operations; extern const struct file_operations ubi_cdev_operations;
extern struct file_operations ubi_vol_cdev_operations; extern const struct file_operations ubi_vol_cdev_operations;
extern struct class *ubi_class; extern struct class *ubi_class;
extern struct mutex ubi_devices_mutex; extern struct mutex ubi_devices_mutex;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册