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
f13c193a
Commit
f13c193a
authored
Jun 03, 2003
by
Patrick Mochel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[driver model] Clean up CPU unregistration.
From Dave Jones.
parent
ed7f90bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
drivers/base/cpu.c
drivers/base/cpu.c
+8
-6
No files found.
drivers/base/cpu.c
View file @
f13c193a
...
...
@@ -46,7 +46,7 @@ int __init register_cpu(struct cpu *cpu, int num, struct node *root)
snprintf
(
cpu
->
sysdev
.
class_dev
.
class_id
,
BUS_ID_SIZE
,
"cpu%d"
,
num
);
retval
=
class_device_register
(
&
cpu
->
sysdev
.
class_dev
);
if
(
retval
)
{
// FIXME cleanup sys_device_register
sys_device_unregister
(
&
cpu
->
sysdev
);
return
retval
;
}
return
0
;
...
...
@@ -58,10 +58,12 @@ int __init cpu_dev_init(void)
int
error
;
error
=
class_register
(
&
cpu_class
);
if
(
!
error
)
{
error
=
driver_register
(
&
cpu_driver
);
if
(
error
)
class_unregister
(
&
cpu_class
);
}
if
(
error
)
goto
out
;
error
=
driver_register
(
&
cpu_driver
);
if
(
error
)
class_unregister
(
&
cpu_class
);
out:
return
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