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
02562d06
Commit
02562d06
authored
May 13, 2003
by
Russell King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ARM] Allow CONFIG_PM to be enabled on all ARM platforms
parent
cb4169bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
2 deletions
+37
-2
arch/arm/kernel/pm.c
arch/arm/kernel/pm.c
+37
-2
No files found.
arch/arm/kernel/pm.c
View file @
02562d06
...
...
@@ -16,10 +16,18 @@
#include <asm/leds.h>
#include <asm/system.h>
/*
* Tell the linker that pm_do_suspend may not be present.
*/
extern
int
pm_do_suspend
(
void
)
__attribute__
((
weak
));
int
suspend
(
void
)
{
int
ret
;
if
(
!
pm_do_suspend
)
return
-
ENOSYS
;
/*
* Suspend "legacy" devices.
*/
...
...
@@ -82,9 +90,26 @@ int suspend(void)
}
#ifdef CONFIG_SYSCTL
/*
* We really want this to die. It's a disgusting hack using unallocated
* sysctl numbers. We should be using a real interface.
*/
#include <linux/init.h>
#include <linux/sysctl.h>
static
int
pm_sysctl_proc_handler
(
ctl_table
*
ctl
,
int
write
,
struct
file
*
filp
,
void
*
buffer
,
size_t
*
lenp
)
{
int
ret
=
-
EIO
;
printk
(
"PM: task %s (pid %d) uses deprecated sysctl PM interface
\n
"
,
current
->
comm
,
current
->
pid
);
if
(
write
)
ret
=
suspend
();
return
ret
;
}
/*
* This came from arch/arm/mach-sa1100/pm.c:
* Copyright (c) 2001 Cliff Brake <cbrake@accelent.com>
...
...
@@ -102,13 +127,23 @@ int suspend(void)
static
struct
ctl_table
pm_table
[]
=
{
{
ACPI_S1_SLP_TYP
,
"suspend"
,
NULL
,
0
,
0600
,
NULL
,
(
proc_handler
*
)
&
suspend
},
{
.
ctl_name
=
ACPI_S1_SLP_TYP
,
.
procname
=
"suspend"
,
.
mode
=
0200
,
.
proc_handler
=
pm_sysctl_proc_handler
,
},
{
0
}
};
static
struct
ctl_table
pm_dir_table
[]
=
{
{
CTL_ACPI
,
"pm"
,
NULL
,
0
,
0555
,
pm_table
},
{
.
ctl_name
=
CTL_ACPI
,
.
procname
=
"pm"
,
.
mode
=
0555
,
.
child
=
pm_table
,
},
{
0
}
};
...
...
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