[PATCH 20/22] sysfs: kill now unused __sysfs_add_file()

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <ebiederm@...>, <cornelia.huck@...>, <greg@...>, <stern@...>, <kay.sievers@...>, <linux-kernel@...>, <htejun@...>
Cc: Tejun Heo <htejun@...>
Date: Thursday, September 20, 2007 - 4:05 am

Kill now unused __sysfs_add_file().

Signed-off-by: Tejun Heo <htejun@gmail.com>
---
 fs/sysfs/file.c  |   23 -----------------------
 fs/sysfs/sysfs.h |    2 --
 2 files changed, 0 insertions(+), 25 deletions(-)

diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c
index 4c0e29f..1d93940 100644
--- a/fs/sysfs/file.c
+++ b/fs/sysfs/file.c
@@ -556,26 +556,3 @@ struct sysfs_dirent *sysfs_add_file(struct sysfs_dirent *parent,
 	return sysfs_insert_one(parent, sd);
 }
 EXPORT_SYMBOL(sysfs_add_file);
-
-int __sysfs_add_file(struct sysfs_dirent *dir_sd, const struct attribute *attr,
-		   int type)
-{
-	umode_t mode = attr->mode & S_IALLUGO;
-	struct sysfs_addrm_cxt acxt;
-	struct sysfs_dirent *sd;
-	int rc;
-
-	sd = sysfs_new_dirent(attr->name, mode, type);
-	if (!sd)
-		return -ENOMEM;
-	sd->s_file.data = (void *)attr;
-
-	sysfs_addrm_start(&acxt);
-	rc = sysfs_add_one(&acxt, dir_sd, sd);
-	sysfs_addrm_finish(&acxt);
-
-	if (rc)
-		sysfs_put(sd);
-
-	return rc;
-}
diff --git a/fs/sysfs/sysfs.h b/fs/sysfs/sysfs.h
index 16ecd6a..62239e3 100644
--- a/fs/sysfs/sysfs.h
+++ b/fs/sysfs/sysfs.h
@@ -145,8 +145,6 @@ int sysfs_hash_and_remove(struct sysfs_dirent *dir_sd, const char *name);
 extern const struct file_operations sysfs_file_operations;
 
 void sysfs_file_check_suicide(struct sysfs_dirent *sd);
-int __sysfs_add_file(struct sysfs_dirent *dir_sd,
-		     const struct attribute *attr, int type);
 
 /*
  * bin.c
-- 
1.5.0.3


-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCHSET 3/4] sysfs: divorce sysfs from kobject and dri..., Eric W. Biederman, (Thu Sep 27, 3:25 pm)
Re: [PATCHSET 3/4] sysfs: divorce sysfs from kobject and dri..., Eric W. Biederman, (Wed Oct 10, 9:16 am)
Re: [PATCHSET 3/4] sysfs: divorce sysfs from kobject and dri..., Eric W. Biederman, (Tue Oct 16, 7:54 pm)
Re: [PATCHSET 3/4] sysfs: divorce sysfs from kobject and dri..., Eric W. Biederman, (Wed Oct 10, 5:16 pm)
[PATCH 20/22] sysfs: kill now unused __sysfs_add_file(), Tejun Heo, (Thu Sep 20, 4:05 am)
[PATCH 21/22] sysfs: kill sysfs_hash_and_remove(), Tejun Heo, (Thu Sep 20, 4:05 am)
[PATCH 05/22] sysfs: implement sysfs_find_child(), Tejun Heo, (Thu Sep 20, 4:05 am)
[PATCH 14/22] sysfs: s/symlink/link/g, Tejun Heo, (Thu Sep 20, 4:05 am)
[PATCH 06/22] sysfs: restructure addrm helpers, Tejun Heo, (Thu Sep 20, 4:05 am)
[PATCH 01/22] sysfs: make sysfs_root a pointer, Tejun Heo, (Thu Sep 20, 4:05 am)
[PATCH 04/22] sysfs: make SYSFS_COPY_NAME a flag, Tejun Heo, (Thu Sep 20, 4:05 am)