aboutsummaryrefslogtreecommitdiffstats
path: root/fs/sysfs/bin.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2007-09-20 03:05:11 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-10-12 17:51:10 -0400
commitb1fc3d6144d56360d1373b01c7881826f558b6cd (patch)
tree3bac4c3df21dc74c6373c3e4a22c3ea6b01b1832 /fs/sysfs/bin.c
parent078ce6409ca54d5fc6eb7d2147cd6efc3eb09078 (diff)
sysfs: make s_elem an anonymous union
Make s_elem an anonymous union. Prefixing with s_elem makes things needlessly longer without any advantage. Signed-off-by: Tejun Heo <htejun@gmail.com> Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs/sysfs/bin.c')
-rw-r--r--fs/sysfs/bin.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/sysfs/bin.c b/fs/sysfs/bin.c
index 9c8f8824e660..247ea19721c3 100644
--- a/fs/sysfs/bin.c
+++ b/fs/sysfs/bin.c
@@ -30,8 +30,8 @@ static int
30fill_read(struct dentry *dentry, char *buffer, loff_t off, size_t count) 30fill_read(struct dentry *dentry, char *buffer, loff_t off, size_t count)
31{ 31{
32 struct sysfs_dirent *attr_sd = dentry->d_fsdata; 32 struct sysfs_dirent *attr_sd = dentry->d_fsdata;
33 struct bin_attribute *attr = attr_sd->s_elem.bin_attr.bin_attr; 33 struct bin_attribute *attr = attr_sd->s_bin_attr.bin_attr;
34 struct kobject *kobj = attr_sd->s_parent->s_elem.dir.kobj; 34 struct kobject *kobj = attr_sd->s_parent->s_dir.kobj;
35 int rc; 35 int rc;
36 36
37 /* need attr_sd for attr, its parent for kobj */ 37 /* need attr_sd for attr, its parent for kobj */
@@ -87,8 +87,8 @@ static int
87flush_write(struct dentry *dentry, char *buffer, loff_t offset, size_t count) 87flush_write(struct dentry *dentry, char *buffer, loff_t offset, size_t count)
88{ 88{
89 struct sysfs_dirent *attr_sd = dentry->d_fsdata; 89 struct sysfs_dirent *attr_sd = dentry->d_fsdata;
90 struct bin_attribute *attr = attr_sd->s_elem.bin_attr.bin_attr; 90 struct bin_attribute *attr = attr_sd->s_bin_attr.bin_attr;
91 struct kobject *kobj = attr_sd->s_parent->s_elem.dir.kobj; 91 struct kobject *kobj = attr_sd->s_parent->s_dir.kobj;
92 int rc; 92 int rc;
93 93
94 /* need attr_sd for attr, its parent for kobj */ 94 /* need attr_sd for attr, its parent for kobj */
@@ -140,8 +140,8 @@ static int mmap(struct file *file, struct vm_area_struct *vma)
140{ 140{
141 struct bin_buffer *bb = file->private_data; 141 struct bin_buffer *bb = file->private_data;
142 struct sysfs_dirent *attr_sd = file->f_path.dentry->d_fsdata; 142 struct sysfs_dirent *attr_sd = file->f_path.dentry->d_fsdata;
143 struct bin_attribute *attr = attr_sd->s_elem.bin_attr.bin_attr; 143 struct bin_attribute *attr = attr_sd->s_bin_attr.bin_attr;
144 struct kobject *kobj = attr_sd->s_parent->s_elem.dir.kobj; 144 struct kobject *kobj = attr_sd->s_parent->s_dir.kobj;
145 int rc; 145 int rc;
146 146
147 mutex_lock(&bb->mutex); 147 mutex_lock(&bb->mutex);
@@ -167,7 +167,7 @@ static int mmap(struct file *file, struct vm_area_struct *vma)
167static int open(struct inode * inode, struct file * file) 167static int open(struct inode * inode, struct file * file)
168{ 168{
169 struct sysfs_dirent *attr_sd = file->f_path.dentry->d_fsdata; 169 struct sysfs_dirent *attr_sd = file->f_path.dentry->d_fsdata;
170 struct bin_attribute *attr = attr_sd->s_elem.bin_attr.bin_attr; 170 struct bin_attribute *attr = attr_sd->s_bin_attr.bin_attr;
171 struct bin_buffer *bb = NULL; 171 struct bin_buffer *bb = NULL;
172 int error; 172 int error;
173 173