summaryrefslogtreecommitdiffstats
path: root/fs/sysfs/dir.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2013-11-28 20:54:14 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-11-30 02:19:16 +0100
commit7c6e2d362c19f01e6d6c8be59d83a89722032884 (patch)
treef47de0a95ae5de6016f19f949dacfe3a77326c31 /fs/sysfs/dir.c
parentMerge 3.13-rc2 into driver-core-next (diff)
downloadlinux-7c6e2d362c19f01e6d6c8be59d83a89722032884.tar.xz
linux-7c6e2d362c19f01e6d6c8be59d83a89722032884.zip
sysfs, kernfs: replace sysfs_dirent->s_dir.kobj and ->s_attr.[bin_]attr with ->priv
A directory sysfs_dirent points to the associated kobj. A regular or bin file points to the associated [bin_]attribute. This patch replaces sysfs_dirent->s_dir.kobj and ->s_attr.[bin_]attr with void * ->priv. This is to prepare for kernfs interface so that sysfs can specify the private data in the same way for directories and files. This lower debuggability but not by much - the whole thing was overlaid in a union anyway. If debuggability becomes an issue, we can later add ->priv accessors which explicitly check for the sysfs_dirent type and performs casting. This patch doesn't introduce any behavior difference. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/sysfs/dir.c')
-rw-r--r--fs/sysfs/dir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c
index 5ba896630d04..aeb08bd3f3dd 100644
--- a/fs/sysfs/dir.c
+++ b/fs/sysfs/dir.c
@@ -681,7 +681,7 @@ static int create_dir(struct kobject *kobj, struct sysfs_dirent *parent_sd,
return -ENOMEM;
sd->s_ns = ns;
- sd->s_dir.kobj = kobj;
+ sd->priv = kobj;
/* link in */
sysfs_addrm_start(&acxt);