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
e3c27d65
Commit
e3c27d65
authored
Aug 18, 2003
by
Patrick Mochel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[acpi] Remove procfs sleep interface.
Use /sys/power/state instead.
parent
b1f3c384
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
82 deletions
+0
-82
drivers/acpi/sleep/proc.c
drivers/acpi/sleep/proc.c
+0
-82
No files found.
drivers/acpi/sleep/proc.c
View file @
e3c27d65
...
...
@@ -13,80 +13,12 @@
#include "sleep.h"
#define ACPI_SYSTEM_FILE_SLEEP "sleep"
#define ACPI_SYSTEM_FILE_ALARM "alarm"
#define _COMPONENT ACPI_SYSTEM_COMPONENT
ACPI_MODULE_NAME
(
"sleep"
)
static
int
acpi_system_sleep_seq_show
(
struct
seq_file
*
seq
,
void
*
offset
)
{
int
i
;
ACPI_FUNCTION_TRACE
(
"acpi_system_sleep_seq_show"
);
for
(
i
=
0
;
i
<=
ACPI_STATE_S5
;
i
++
)
{
if
(
sleep_states
[
i
])
{
seq_printf
(
seq
,
"S%d "
,
i
);
if
(
i
==
ACPI_STATE_S4
&&
acpi_gbl_FACS
->
S4bios_f
)
seq_printf
(
seq
,
"S4bios "
);
}
}
seq_puts
(
seq
,
"
\n
"
);
return
0
;
}
static
int
acpi_system_sleep_open_fs
(
struct
inode
*
inode
,
struct
file
*
file
)
{
return
single_open
(
file
,
acpi_system_sleep_seq_show
,
PDE
(
inode
)
->
data
);
}
static
int
acpi_system_write_sleep
(
struct
file
*
file
,
const
char
*
buffer
,
size_t
count
,
loff_t
*
ppos
)
{
acpi_status
status
=
AE_ERROR
;
char
state_string
[
12
]
=
{
'\0'
};
u32
state
=
0
;
ACPI_FUNCTION_TRACE
(
"acpi_system_write_sleep"
);
if
(
count
>
sizeof
(
state_string
)
-
1
)
goto
Done
;
if
(
copy_from_user
(
state_string
,
buffer
,
count
))
return_VALUE
(
-
EFAULT
);
state_string
[
count
]
=
'\0'
;
state
=
simple_strtoul
(
state_string
,
NULL
,
0
);
if
(
state
<
1
||
state
>
4
)
goto
Done
;
if
(
!
sleep_states
[
state
])
goto
Done
;
#ifdef CONFIG_SOFTWARE_SUSPEND
if
(
state
==
4
)
{
software_suspend
();
goto
Done
;
}
#endif
status
=
acpi_suspend
(
state
);
Done:
if
(
ACPI_FAILURE
(
status
))
return_VALUE
(
-
EINVAL
);
else
return_VALUE
(
count
);
}
static
int
acpi_system_alarm_seq_show
(
struct
seq_file
*
seq
,
void
*
offset
)
{
u32
sec
,
min
,
hr
;
...
...
@@ -362,14 +294,6 @@ acpi_system_write_alarm (
}
static
struct
file_operations
acpi_system_sleep_fops
=
{
.
open
=
acpi_system_sleep_open_fs
,
.
read
=
seq_read
,
.
write
=
acpi_system_write_sleep
,
.
llseek
=
seq_lseek
,
.
release
=
single_release
,
};
static
struct
file_operations
acpi_system_alarm_fops
=
{
.
open
=
acpi_system_alarm_open_fs
,
.
read
=
seq_read
,
...
...
@@ -383,12 +307,6 @@ static int acpi_sleep_proc_init(void)
{
struct
proc_dir_entry
*
entry
=
NULL
;
/* 'sleep' [R/W]*/
entry
=
create_proc_entry
(
ACPI_SYSTEM_FILE_SLEEP
,
S_IFREG
|
S_IRUGO
|
S_IWUSR
,
acpi_root_dir
);
if
(
entry
)
entry
->
proc_fops
=
&
acpi_system_sleep_fops
;
/* 'alarm' [R/W] */
entry
=
create_proc_entry
(
ACPI_SYSTEM_FILE_ALARM
,
S_IFREG
|
S_IRUGO
|
S_IWUSR
,
acpi_root_dir
);
...
...
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