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
Kirill Smelkov
linux
Commits
9d6cc8f2
Commit
9d6cc8f2
authored
Feb 03, 2004
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] Driver core: remove device_unregister_wait() as it's a very bad idea.
parent
a2db4282
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
25 deletions
+0
-25
drivers/base/core.c
drivers/base/core.c
+0
-23
include/linux/device.h
include/linux/device.h
+0
-2
No files found.
drivers/base/core.c
View file @
9d6cc8f2
...
...
@@ -76,7 +76,6 @@ static struct sysfs_ops dev_sysfs_ops = {
static
void
device_release
(
struct
kobject
*
kobj
)
{
struct
device
*
dev
=
to_dev
(
kobj
);
struct
completion
*
c
=
dev
->
complete
;
if
(
dev
->
release
)
dev
->
release
(
dev
);
...
...
@@ -86,8 +85,6 @@ static void device_release(struct kobject * kobj)
dev
->
bus_id
);
WARN_ON
(
1
);
}
if
(
c
)
complete
(
c
);
}
static
struct
kobj_type
ktype_device
=
{
...
...
@@ -354,25 +351,6 @@ void device_unregister(struct device * dev)
}
/**
* device_unregister_wait - Unregister device and wait for it to be freed.
* @dev: Device to unregister.
*
* For the cases where the caller needs to wait for all references to
* be dropped from the device before continuing (e.g. modules with
* statically allocated devices), this function uses a completion struct
* to wait, along with a matching complete() in device_release() above.
*/
void
device_unregister_wait
(
struct
device
*
dev
)
{
struct
completion
c
;
init_completion
(
&
c
);
dev
->
complete
=
&
c
;
device_unregister
(
dev
);
wait_for_completion
(
&
c
);
}
/**
* device_for_each_child - device child iterator.
* @dev: parent struct device.
...
...
@@ -421,7 +399,6 @@ EXPORT_SYMBOL(device_register);
EXPORT_SYMBOL
(
device_del
);
EXPORT_SYMBOL
(
device_unregister
);
EXPORT_SYMBOL
(
device_unregister_wait
);
EXPORT_SYMBOL
(
get_device
);
EXPORT_SYMBOL
(
put_device
);
EXPORT_SYMBOL
(
device_find
);
...
...
include/linux/device.h
View file @
9d6cc8f2
...
...
@@ -265,7 +265,6 @@ struct device {
struct
list_head
children
;
struct
device
*
parent
;
struct
completion
*
complete
;
/* Notification for freeing device. */
struct
kobject
kobj
;
char
bus_id
[
BUS_ID_SIZE
];
/* position on parent bus */
...
...
@@ -313,7 +312,6 @@ dev_set_drvdata (struct device *dev, void *data)
*/
extern
int
device_register
(
struct
device
*
dev
);
extern
void
device_unregister
(
struct
device
*
dev
);
extern
void
device_unregister_wait
(
struct
device
*
dev
);
extern
void
device_initialize
(
struct
device
*
dev
);
extern
int
device_add
(
struct
device
*
dev
);
extern
void
device_del
(
struct
device
*
dev
);
...
...
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