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
f21c8fc3
Commit
f21c8fc3
authored
Oct 16, 2002
by
Patrick Mochel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
driver model: make sure we call device_unregister() and not put_device()
when removing system and platform devices.
parent
007aa553
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
drivers/base/platform.c
drivers/base/platform.c
+1
-1
drivers/base/sys.c
drivers/base/sys.c
+5
-3
No files found.
drivers/base/platform.c
View file @
f21c8fc3
...
...
@@ -39,7 +39,7 @@ int platform_device_register(struct platform_device * pdev)
void
platform_device_unregister
(
struct
platform_device
*
pdev
)
{
if
(
pdev
)
put_device
(
&
pdev
->
dev
);
device_unregister
(
&
pdev
->
dev
);
}
static
int
platform_match
(
struct
device
*
dev
,
struct
device_driver
*
drv
)
...
...
drivers/base/sys.c
View file @
f21c8fc3
...
...
@@ -10,6 +10,8 @@
* add themselves as children of the system bus.
*/
#define DEBUG 1
#include <linux/device.h>
#include <linux/module.h>
#include <linux/kernel.h>
...
...
@@ -76,8 +78,8 @@ int sys_register_root(struct sys_root * root)
*/
void
sys_unegister_root
(
struct
sys_root
*
root
)
{
put_device
(
&
root
->
sysdev
);
put_device
(
&
root
->
dev
);
device_unregister
(
&
root
->
sysdev
);
device_unregister
(
&
root
->
dev
);
}
/**
...
...
@@ -125,7 +127,7 @@ int sys_device_register(struct sys_device * sysdev)
void
sys_device_unregister
(
struct
sys_device
*
sysdev
)
{
if
(
sysdev
)
put_device
(
&
sysdev
->
dev
);
device_unregister
(
&
sysdev
->
dev
);
}
struct
bus_type
system_bus_type
=
{
...
...
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