lkml.org 
[lkml]   [2008]   [Sep]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] sysfs: Remove sysfs_do_create_link().
Since sysfs_create_link_nowarn() is gone, sysfs_do_create_link()
is an unneeded indirection: Remove it.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>

---
fs/sysfs/symlink.c | 27 +++++++++------------------
1 file changed, 9 insertions(+), 18 deletions(-)

--- linux-2.6.orig/fs/sysfs/symlink.c
+++ linux-2.6/fs/sysfs/symlink.c
@@ -19,8 +19,14 @@

#include "sysfs.h"

-static int sysfs_do_create_link(struct kobject *kobj, struct kobject *target,
- const char *name, int warn)
+/**
+ * sysfs_create_link - create symlink between two objects.
+ * @kobj: object whose directory we're creating the link in.
+ * @target: object we're pointing to.
+ * @name: name of the symlink.
+ */
+int sysfs_create_link(struct kobject *kobj, struct kobject *target,
+ const char *name)
{
struct sysfs_dirent *parent_sd = NULL;
struct sysfs_dirent *target_sd = NULL;
@@ -60,10 +66,7 @@ static int sysfs_do_create_link(struct k
target_sd = NULL; /* reference is now owned by the symlink */

sysfs_addrm_start(&acxt, parent_sd);
- if (warn)
- error = sysfs_add_one(&acxt, sd);
- else
- error = __sysfs_add_one(&acxt, sd);
+ error = sysfs_add_one(&acxt, sd);
sysfs_addrm_finish(&acxt);

if (error)
@@ -78,18 +81,6 @@ static int sysfs_do_create_link(struct k
}

/**
- * sysfs_create_link - create symlink between two objects.
- * @kobj: object whose directory we're creating the link in.
- * @target: object we're pointing to.
- * @name: name of the symlink.
- */
-int sysfs_create_link(struct kobject *kobj, struct kobject *target,
- const char *name)
-{
- return sysfs_do_create_link(kobj, target, name, 1);
-}
-
-/**
* sysfs_delete_link - remove symlink in object's directory.
* @kobj: object we're acting for.
* @targ: object we're pointing to.

\
 
 \ /
  Last update: 2008-09-18 15:11    [W:0.061 / U:64.664 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site