Commit d22af367 authored by Christoph Hellwig's avatar Christoph Hellwig

[PATCH] devfs: remove devfs_unregister

parent fe4268fc
......@@ -1442,7 +1442,6 @@ static void devfsd_notify (struct devfs_entry *de,unsigned short type)
* this to whatever you like, and change it once the file is opened (the next
* file opened will not see this change).
*
* Returns a handle which may later be used in a call to devfs_unregister().
* On failure %NULL is returned.
*/
......@@ -1457,6 +1456,7 @@ devfs_handle_t devfs_register (devfs_handle_t dir, const char *name,
/* we don't accept any flags anymore. prototype will change soon. */
WARN_ON(flags);
WARN_ON(dir);
if (name == NULL)
{
......@@ -1578,24 +1578,6 @@ static void _devfs_unregister (struct devfs_entry *dir, struct devfs_entry *de)
}
} /* End Function _devfs_unregister */
/**
* devfs_unregister - Unregister a device entry.
* @de: A handle previously created by devfs_register() or returned from
* devfs_get_handle(). If this is %NULL the routine does nothing.
*/
void devfs_unregister (devfs_handle_t de)
{
VERIFY_ENTRY (de);
if ( (de == NULL) || (de->parent == NULL) ) return;
DPRINTK (DEBUG_UNREGISTER, "(%s): de: %p refcount: %d\n",
de->name, de, atomic_read (&de->refcount) );
write_lock (&de->parent->u.dir.lock);
_devfs_unregister (de->parent, de);
devfs_put (de);
} /* End Function devfs_unregister */
static int devfs_do_symlink (devfs_handle_t dir, const char *name,
const char *link, devfs_handle_t *handle)
{
......@@ -1678,7 +1660,6 @@ int devfs_mk_symlink(const char *from, const char *to)
* Use of this function is optional. The devfs_register() function
* will automatically create intermediate directories as needed. This function
* is provided for efficiency reasons, as it provides a handle to a directory.
* Returns a handle which may later be used in a call to devfs_unregister().
* On failure %NULL is returned.
*/
......@@ -1730,7 +1711,10 @@ void devfs_remove(const char *fmt, ...)
n = vsnprintf(buf, 64, fmt, args);
if (n < 64 && buf[0]) {
devfs_handle_t de = _devfs_find_entry(NULL, buf, 0);
devfs_unregister(de);
write_lock(&de->parent->u.dir.lock);
_devfs_unregister(de->parent, de);
devfs_put(de);
devfs_put(de);
}
}
......@@ -1863,7 +1847,6 @@ __setup("devfs=", devfs_setup);
EXPORT_SYMBOL(devfs_put);
EXPORT_SYMBOL(devfs_register);
EXPORT_SYMBOL(devfs_unregister);
EXPORT_SYMBOL(devfs_mk_symlink);
EXPORT_SYMBOL(devfs_mk_dir);
EXPORT_SYMBOL(devfs_remove);
......
......@@ -25,7 +25,6 @@ extern devfs_handle_t devfs_register (devfs_handle_t dir, const char *name,
unsigned int flags,
unsigned int major, unsigned int minor,
umode_t mode, void *ops, void *info);
extern void devfs_unregister (devfs_handle_t de);
extern int devfs_mk_symlink (const char *name, const char *link);
extern devfs_handle_t devfs_mk_dir(const char *fmt, ...)
__attribute__((format (printf, 1, 2)));
......@@ -50,10 +49,6 @@ static inline devfs_handle_t devfs_register (devfs_handle_t dir,
{
return NULL;
}
static inline void devfs_unregister (devfs_handle_t de)
{
return;
}
static inline int devfs_mk_symlink (const char *name, const char *link)
{
return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment