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
3cc944bb
Commit
3cc944bb
authored
Jun 09, 2003
by
Patrick Mochel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[lapic] Convert to new system device API.
parent
60c37a8b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
22 deletions
+17
-22
arch/i386/kernel/apic.c
arch/i386/kernel/apic.c
+17
-22
No files found.
arch/i386/kernel/apic.c
View file @
3cc944bb
...
...
@@ -484,13 +484,11 @@ static struct {
unsigned
int
apic_thmr
;
}
apic_pm_state
;
static
int
lapic_suspend
(
struct
device
*
dev
,
u32
state
,
u32
level
)
static
int
lapic_suspend
(
struct
sys_device
*
dev
,
u32
state
)
{
unsigned
int
l
,
h
;
unsigned
long
flags
;
if
(
level
!=
SUSPEND_POWER_DOWN
)
return
0
;
if
(
!
apic_pm_state
.
active
)
return
0
;
...
...
@@ -517,13 +515,11 @@ static int lapic_suspend(struct device *dev, u32 state, u32 level)
return
0
;
}
static
int
lapic_resume
(
struct
device
*
dev
,
u32
level
)
static
int
lapic_resume
(
struct
sys_device
*
dev
)
{
unsigned
int
l
,
h
;
unsigned
long
flags
;
if
(
level
!=
RESUME_POWER_ON
)
return
0
;
if
(
!
apic_pm_state
.
active
)
return
0
;
...
...
@@ -557,38 +553,37 @@ static int lapic_resume(struct device *dev, u32 level)
return
0
;
}
static
struct
device_driver
lapic_driver
=
{
.
name
=
"lapic"
,
.
bus
=
&
system_bus_type
,
static
struct
sysdev_class
lapic_sysclass
=
{
set_kset_name
(
"lapic"
)
,
.
resume
=
lapic_resume
,
.
suspend
=
lapic_suspend
,
};
/* not static, needed by child devices */
struct
sys_device
device_lapic
=
{
.
name
=
"lapic"
,
.
id
=
0
,
.
dev
=
{
.
name
=
"lapic"
,
.
driver
=
&
lapic_driver
,
},
static
struct
sys_device
device_lapic
=
{
.
id
=
0
,
.
cls
=
&
lapic_sysclass
,
};
EXPORT_SYMBOL
(
device_lapic
);
static
void
__init
apic_pm_activate
(
void
)
{
apic_pm_state
.
active
=
1
;
}
static
int
__init
init_lapic_
device
fs
(
void
)
static
int
__init
init_lapic_
sys
fs
(
void
)
{
int
error
;
if
(
!
cpu_has_apic
)
return
0
;
/* XXX: remove suspend/resume procs if !apic_pm_state.active? */
driver_register
(
&
lapic_driver
);
return
sys_device_register
(
&
device_lapic
);
error
=
sysdev_class_register
(
&
lapic_sysclass
);
if
(
!
error
)
error
=
sys_device_register
(
&
device_lapic
);
return
error
;
}
device_initcall
(
init_lapic_
device
fs
);
device_initcall
(
init_lapic_
sys
fs
);
#else
/* CONFIG_PM */
...
...
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