Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
d22af367
Commit
d22af367
authored
Apr 20, 2003
by
Christoph Hellwig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] devfs: remove devfs_unregister
parent
fe4268fc
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
27 deletions
+5
-27
fs/devfs/base.c
fs/devfs/base.c
+5
-22
include/linux/devfs_fs_kernel.h
include/linux/devfs_fs_kernel.h
+0
-5
No files found.
fs/devfs/base.c
View file @
d22af367
...
@@ -1442,7 +1442,6 @@ static void devfsd_notify (struct devfs_entry *de,unsigned short type)
...
@@ -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
* this to whatever you like, and change it once the file is opened (the next
* file opened will not see this change).
* 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.
* On failure %NULL is returned.
*/
*/
...
@@ -1457,6 +1456,7 @@ devfs_handle_t devfs_register (devfs_handle_t dir, const char *name,
...
@@ -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. */
/* we don't accept any flags anymore. prototype will change soon. */
WARN_ON
(
flags
);
WARN_ON
(
flags
);
WARN_ON
(
dir
);
if
(
name
==
NULL
)
if
(
name
==
NULL
)
{
{
...
@@ -1578,24 +1578,6 @@ static void _devfs_unregister (struct devfs_entry *dir, struct devfs_entry *de)
...
@@ -1578,24 +1578,6 @@ static void _devfs_unregister (struct devfs_entry *dir, struct devfs_entry *de)
}
}
}
/* End Function _devfs_unregister */
}
/* 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
,
static
int
devfs_do_symlink
(
devfs_handle_t
dir
,
const
char
*
name
,
const
char
*
link
,
devfs_handle_t
*
handle
)
const
char
*
link
,
devfs_handle_t
*
handle
)
{
{
...
@@ -1678,7 +1660,6 @@ int devfs_mk_symlink(const char *from, const char *to)
...
@@ -1678,7 +1660,6 @@ int devfs_mk_symlink(const char *from, const char *to)
* Use of this function is optional. The devfs_register() function
* Use of this function is optional. The devfs_register() function
* will automatically create intermediate directories as needed. This function
* will automatically create intermediate directories as needed. This function
* is provided for efficiency reasons, as it provides a handle to a directory.
* 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.
* On failure %NULL is returned.
*/
*/
...
@@ -1730,7 +1711,10 @@ void devfs_remove(const char *fmt, ...)
...
@@ -1730,7 +1711,10 @@ void devfs_remove(const char *fmt, ...)
n
=
vsnprintf
(
buf
,
64
,
fmt
,
args
);
n
=
vsnprintf
(
buf
,
64
,
fmt
,
args
);
if
(
n
<
64
&&
buf
[
0
])
{
if
(
n
<
64
&&
buf
[
0
])
{
devfs_handle_t
de
=
_devfs_find_entry
(
NULL
,
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
);
devfs_put
(
de
);
}
}
}
}
...
@@ -1863,7 +1847,6 @@ __setup("devfs=", devfs_setup);
...
@@ -1863,7 +1847,6 @@ __setup("devfs=", devfs_setup);
EXPORT_SYMBOL
(
devfs_put
);
EXPORT_SYMBOL
(
devfs_put
);
EXPORT_SYMBOL
(
devfs_register
);
EXPORT_SYMBOL
(
devfs_register
);
EXPORT_SYMBOL
(
devfs_unregister
);
EXPORT_SYMBOL
(
devfs_mk_symlink
);
EXPORT_SYMBOL
(
devfs_mk_symlink
);
EXPORT_SYMBOL
(
devfs_mk_dir
);
EXPORT_SYMBOL
(
devfs_mk_dir
);
EXPORT_SYMBOL
(
devfs_remove
);
EXPORT_SYMBOL
(
devfs_remove
);
...
...
include/linux/devfs_fs_kernel.h
View file @
d22af367
...
@@ -25,7 +25,6 @@ extern devfs_handle_t devfs_register (devfs_handle_t dir, const char *name,
...
@@ -25,7 +25,6 @@ extern devfs_handle_t devfs_register (devfs_handle_t dir, const char *name,
unsigned
int
flags
,
unsigned
int
flags
,
unsigned
int
major
,
unsigned
int
minor
,
unsigned
int
major
,
unsigned
int
minor
,
umode_t
mode
,
void
*
ops
,
void
*
info
);
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
int
devfs_mk_symlink
(
const
char
*
name
,
const
char
*
link
);
extern
devfs_handle_t
devfs_mk_dir
(
const
char
*
fmt
,
...)
extern
devfs_handle_t
devfs_mk_dir
(
const
char
*
fmt
,
...)
__attribute__
((
format
(
printf
,
1
,
2
)));
__attribute__
((
format
(
printf
,
1
,
2
)));
...
@@ -50,10 +49,6 @@ static inline devfs_handle_t devfs_register (devfs_handle_t dir,
...
@@ -50,10 +49,6 @@ static inline devfs_handle_t devfs_register (devfs_handle_t dir,
{
{
return
NULL
;
return
NULL
;
}
}
static
inline
void
devfs_unregister
(
devfs_handle_t
de
)
{
return
;
}
static
inline
int
devfs_mk_symlink
(
const
char
*
name
,
const
char
*
link
)
static
inline
int
devfs_mk_symlink
(
const
char
*
name
,
const
char
*
link
)
{
{
return
0
;
return
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment