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
bc2f37cc
Commit
bc2f37cc
authored
Jun 09, 2003
by
Patrick Mochel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[oprofile] Convert to use new system device API.
parent
9191f600
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
18 deletions
+13
-18
arch/i386/oprofile/nmi_int.c
arch/i386/oprofile/nmi_int.c
+13
-18
No files found.
arch/i386/oprofile/nmi_int.c
View file @
bc2f37cc
...
...
@@ -31,53 +31,48 @@ static int nmi_enabled = 0;
#ifdef CONFIG_PM
static
int
nmi_suspend
(
struct
device
*
dev
,
u32
state
,
u32
level
)
static
int
nmi_suspend
(
struct
sys_device
*
dev
,
u32
state
)
{
if
(
level
!=
SUSPEND_POWER_DOWN
)
return
0
;
if
(
nmi_enabled
==
1
)
nmi_stop
();
return
0
;
}
static
int
nmi_resume
(
struct
device
*
dev
,
u32
level
)
static
int
nmi_resume
(
struct
sys_device
*
dev
)
{
if
(
level
!=
RESUME_POWER_ON
)
return
0
;
if
(
nmi_enabled
==
1
)
nmi_start
();
return
0
;
}
static
struct
device_driver
nmi_driver
=
{
.
name
=
"oprofile"
,
.
bus
=
&
system_bus_type
,
static
struct
sysdev_class
oprofile_sysclass
=
{
set_kset_name
(
"oprofile"
),
.
resume
=
nmi_resume
,
.
suspend
=
nmi_suspend
,
};
static
struct
device
device_nmi
=
{
.
name
=
"oprofile"
,
.
bus_id
=
"oprofile"
,
.
driver
=
&
nmi_driver
,
.
parent
=
&
device_lapic
.
dev
,
static
struct
sys_device
device_oprofile
=
{
.
id
=
0
,
.
cls
=
&
oprofile_sysclass
,
};
static
int
__init
init_driverfs
(
void
)
{
driver_register
(
&
nmi_driver
);
return
device_register
(
&
device_nmi
);
int
error
;
if
(
!
(
error
=
sysdev_class_register
(
&
oprofile_sysclass
)))
error
=
sys_device_register
(
&
device_oprofile
);
return
error
;
}
static
void
__exit
exit_driverfs
(
void
)
{
device_unregister
(
&
device_nmi
);
driver_unregister
(
&
nmi_driver
);
sys_device_unregister
(
&
device_oprofile
);
sysdev_class_unregister
(
&
oprofile_sysclass
);
}
#else
...
...
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