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
2343ef93
Commit
2343ef93
authored
Oct 17, 2002
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
driver core: fix up merge mess
parent
12f75c41
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
40 deletions
+0
-40
drivers/base/core.c
drivers/base/core.c
+0
-40
No files found.
drivers/base/core.c
View file @
2343ef93
...
...
@@ -25,46 +25,6 @@ spinlock_t device_lock = SPIN_LOCK_UNLOCKED;
#define to_dev(node) container_of(node,struct device,driver_list)
}
int
driver_attach
(
struct
device_driver
*
drv
)
{
return
bus_for_each_dev
(
drv
->
bus
,
drv
,
do_driver_attach
);
}
void
driver_detach
(
struct
device_driver
*
drv
)
{
struct
list_head
*
node
;
struct
device
*
prev
=
NULL
;
spin_lock
(
&
device_lock
);
list_for_each
(
node
,
&
drv
->
devices
)
{
struct
device
*
dev
=
get_device_locked
(
to_dev
(
node
));
if
(
dev
)
{
if
(
prev
)
list_del_init
(
&
prev
->
driver_list
);
spin_unlock
(
&
device_lock
);
device_detach
(
dev
);
if
(
prev
)
put_device
(
prev
);
prev
=
dev
;
spin_lock
(
&
device_lock
);
}
}
spin_unlock
(
&
device_lock
);
}
/**
* device_register - register a device
* @dev: pointer to the device structure
*
* First, make sure that the device has a parent, create
* a directory for it, then add it to the parent's list of
* children.
*
* Maintains a global list of all devices, in depth-first ordering.
* The head for that list is device_root.g_list.
*/
int
device_add
(
struct
device
*
dev
)
{
int
error
;
...
...
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