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
232adff4
Commit
232adff4
authored
May 05, 2003
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://kernel.bkbits.net/davem/sparc-2.5
into home.transmeta.com:/home/torvalds/v2.5/linux
parents
4411f5fc
df608e6a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
arch/sparc64/kernel/power.c
arch/sparc64/kernel/power.c
+11
-1
No files found.
arch/sparc64/kernel/power.c
View file @
232adff4
...
@@ -84,6 +84,16 @@ static int powerd(void *__unused)
...
@@ -84,6 +84,16 @@ static int powerd(void *__unused)
return
0
;
return
0
;
}
}
static
int
__init
has_button_interrupt
(
struct
linux_ebus_device
*
edev
)
{
if
(
edev
->
irqs
[
0
]
==
PCI_IRQ_NONE
)
return
0
;
if
(
!
prom_node_has_property
(
edev
->
prom_node
,
"button"
))
return
0
;
return
1
;
}
void
__init
power_init
(
void
)
void
__init
power_init
(
void
)
{
{
struct
linux_ebus
*
ebus
;
struct
linux_ebus
*
ebus
;
...
@@ -106,7 +116,7 @@ void __init power_init(void)
...
@@ -106,7 +116,7 @@ void __init power_init(void)
power_reg
=
(
unsigned
long
)
ioremap
(
edev
->
resource
[
0
].
start
,
0x4
);
power_reg
=
(
unsigned
long
)
ioremap
(
edev
->
resource
[
0
].
start
,
0x4
);
printk
(
"power: Control reg at %016lx ... "
,
power_reg
);
printk
(
"power: Control reg at %016lx ... "
,
power_reg
);
poweroff_method
=
machine_halt
;
/* able to use the standard halt */
poweroff_method
=
machine_halt
;
/* able to use the standard halt */
if
(
edev
->
irqs
[
0
]
!=
PCI_IRQ_NONE
)
{
if
(
has_button_interrupt
(
edev
)
)
{
if
(
kernel_thread
(
powerd
,
0
,
CLONE_FS
)
<
0
)
{
if
(
kernel_thread
(
powerd
,
0
,
CLONE_FS
)
<
0
)
{
printk
(
"Failed to start power daemon.
\n
"
);
printk
(
"Failed to start power daemon.
\n
"
);
return
;
return
;
...
...
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