Driver core: Constify struct sysfs_ops in struct kobj_type
[linux-2.6-block.git] / fs / sysfs / file.c
index 50b725bcc3f3a86441826c101c5faa7cebd27460..ced2299f1c9a3286443dbb4796f9691e82fe2d5e 100644 (file)
@@ -53,7 +53,7 @@ struct sysfs_buffer {
        size_t                  count;
        loff_t                  pos;
        char                    * page;
-       struct sysfs_ops        * ops;
+       const struct sysfs_ops  * ops;
        struct mutex            mutex;
        int                     needs_read_fill;
        int                     event;
@@ -75,7 +75,7 @@ static int fill_read_buffer(struct dentry * dentry, struct sysfs_buffer * buffer
 {
        struct sysfs_dirent *attr_sd = dentry->d_fsdata;
        struct kobject *kobj = attr_sd->s_parent->s_dir.kobj;
-       struct sysfs_ops * ops = buffer->ops;
+       const struct sysfs_ops * ops = buffer->ops;
        int ret = 0;
        ssize_t count;
 
@@ -199,7 +199,7 @@ flush_write_buffer(struct dentry * dentry, struct sysfs_buffer * buffer, size_t
 {
        struct sysfs_dirent *attr_sd = dentry->d_fsdata;
        struct kobject *kobj = attr_sd->s_parent->s_dir.kobj;
-       struct sysfs_ops * ops = buffer->ops;
+       const struct sysfs_ops * ops = buffer->ops;
        int rc;
 
        /* need attr_sd for attr and ops, its parent for kobj */
@@ -335,7 +335,7 @@ static int sysfs_open_file(struct inode *inode, struct file *file)
        struct sysfs_dirent *attr_sd = file->f_path.dentry->d_fsdata;
        struct kobject *kobj = attr_sd->s_parent->s_dir.kobj;
        struct sysfs_buffer *buffer;
-       struct sysfs_ops *ops;
+       const struct sysfs_ops *ops;
        int error = -EACCES;
        char *p;