diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-10 19:10:33 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-10 19:10:33 -0500 |
commit | e54be894eae10eca9892e965cc9532f5d5a11767 (patch) | |
tree | 27ace4446e42058ef4813a34bf63b55a870e7a12 /fs/sysfs | |
parent | 949f6711b83d2809d1ccb9d830155a65fdacdff9 (diff) | |
parent | c6c0ac664c86ff6408fadbed4913938c8a732e26 (diff) |
Merge branch 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
* 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6:
driver core: Document that device_rename() is only for networking
sysfs: remove useless test from sysfs_merge_group
driver-core: merge private parts of class and bus
driver core: fix whitespace in class_attr_string
Diffstat (limited to 'fs/sysfs')
-rw-r--r-- | fs/sysfs/group.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/fs/sysfs/group.c b/fs/sysfs/group.c index 442f34ff1af8..c8769dc222d8 100644 --- a/fs/sysfs/group.c +++ b/fs/sysfs/group.c | |||
@@ -165,10 +165,7 @@ int sysfs_merge_group(struct kobject *kobj, | |||
165 | struct attribute *const *attr; | 165 | struct attribute *const *attr; |
166 | int i; | 166 | int i; |
167 | 167 | ||
168 | if (grp) | 168 | dir_sd = sysfs_get_dirent(kobj->sd, NULL, grp->name); |
169 | dir_sd = sysfs_get_dirent(kobj->sd, NULL, grp->name); | ||
170 | else | ||
171 | dir_sd = sysfs_get(kobj->sd); | ||
172 | if (!dir_sd) | 169 | if (!dir_sd) |
173 | return -ENOENT; | 170 | return -ENOENT; |
174 | 171 | ||
@@ -195,10 +192,7 @@ void sysfs_unmerge_group(struct kobject *kobj, | |||
195 | struct sysfs_dirent *dir_sd; | 192 | struct sysfs_dirent *dir_sd; |
196 | struct attribute *const *attr; | 193 | struct attribute *const *attr; |
197 | 194 | ||
198 | if (grp) | 195 | dir_sd = sysfs_get_dirent(kobj->sd, NULL, grp->name); |
199 | dir_sd = sysfs_get_dirent(kobj->sd, NULL, grp->name); | ||
200 | else | ||
201 | dir_sd = sysfs_get(kobj->sd); | ||
202 | if (dir_sd) { | 196 | if (dir_sd) { |
203 | for (attr = grp->attrs; *attr; ++attr) | 197 | for (attr = grp->attrs; *attr; ++attr) |
204 | sysfs_hash_and_remove(dir_sd, NULL, (*attr)->name); | 198 | sysfs_hash_and_remove(dir_sd, NULL, (*attr)->name); |