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
92131481
Commit
92131481
authored
Dec 06, 2007
by
Len Brown
Browse files
Options
Browse Files
Download
Plain Diff
Pull apm-freeze-fix into release branch
parents
f7a5274d
cb43c54c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
drivers/char/apm-emulation.c
drivers/char/apm-emulation.c
+8
-7
No files found.
drivers/char/apm-emulation.c
View file @
92131481
...
...
@@ -295,7 +295,6 @@ static int
apm_ioctl
(
struct
inode
*
inode
,
struct
file
*
filp
,
u_int
cmd
,
u_long
arg
)
{
struct
apm_user
*
as
=
filp
->
private_data
;
unsigned
long
flags
;
int
err
=
-
EINVAL
;
if
(
!
as
->
suser
||
!
as
->
writer
)
...
...
@@ -331,10 +330,16 @@ apm_ioctl(struct inode * inode, struct file *filp, u_int cmd, u_long arg)
* Wait for the suspend/resume to complete. If there
* are pending acknowledges, we wait here for them.
*/
f
lags
=
current
->
flags
;
f
reezer_do_not_count
()
;
wait_event
(
apm_suspend_waitqueue
,
as
->
suspend_state
==
SUSPEND_DONE
);
/*
* Since we are waiting until the suspend is done, the
* try_to_freeze() in freezer_count() will not trigger
*/
freezer_count
();
}
else
{
as
->
suspend_state
=
SUSPEND_WAIT
;
mutex_unlock
(
&
state_lock
);
...
...
@@ -362,14 +367,10 @@ apm_ioctl(struct inode * inode, struct file *filp, u_int cmd, u_long arg)
* Wait for the suspend/resume to complete. If there
* are pending acknowledges, we wait here for them.
*/
flags
=
current
->
flags
;
wait_event_interruptible
(
apm_suspend_waitqueue
,
wait_event_freezable
(
apm_suspend_waitqueue
,
as
->
suspend_state
==
SUSPEND_DONE
);
}
current
->
flags
=
flags
;
mutex_lock
(
&
state_lock
);
err
=
as
->
suspend_result
;
as
->
suspend_state
=
SUSPEND_NONE
;
...
...
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