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
78a6948b
Commit
78a6948b
authored
May 13, 2021
by
Rafael J. Wysocki
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'pm-core'
* pm-core: PM: runtime: Fix unpaired parent child_count for force_resume
parents
e5af36b2
c745253e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
drivers/base/power/runtime.c
drivers/base/power/runtime.c
+7
-3
include/linux/pm.h
include/linux/pm.h
+1
-0
No files found.
drivers/base/power/runtime.c
View file @
78a6948b
...
...
@@ -1637,6 +1637,7 @@ void pm_runtime_init(struct device *dev)
dev
->
power
.
request_pending
=
false
;
dev
->
power
.
request
=
RPM_REQ_NONE
;
dev
->
power
.
deferred_resume
=
false
;
dev
->
power
.
needs_force_resume
=
0
;
INIT_WORK
(
&
dev
->
power
.
work
,
pm_runtime_work
);
dev
->
power
.
timer_expires
=
0
;
...
...
@@ -1804,10 +1805,12 @@ int pm_runtime_force_suspend(struct device *dev)
* its parent, but set its status to RPM_SUSPENDED anyway in case this
* function will be called again for it in the meantime.
*/
if
(
pm_runtime_need_not_resume
(
dev
))
if
(
pm_runtime_need_not_resume
(
dev
))
{
pm_runtime_set_suspended
(
dev
);
else
}
else
{
__update_runtime_status
(
dev
,
RPM_SUSPENDED
);
dev
->
power
.
needs_force_resume
=
1
;
}
return
0
;
...
...
@@ -1834,7 +1837,7 @@ int pm_runtime_force_resume(struct device *dev)
int
(
*
callback
)(
struct
device
*
);
int
ret
=
0
;
if
(
!
pm_runtime_status_suspended
(
dev
)
||
pm_runtime_need_not_resume
(
dev
)
)
if
(
!
pm_runtime_status_suspended
(
dev
)
||
!
dev
->
power
.
needs_force_resume
)
goto
out
;
/*
...
...
@@ -1853,6 +1856,7 @@ int pm_runtime_force_resume(struct device *dev)
pm_runtime_mark_last_busy
(
dev
);
out:
dev
->
power
.
needs_force_resume
=
0
;
pm_runtime_enable
(
dev
);
return
ret
;
}
...
...
include/linux/pm.h
View file @
78a6948b
...
...
@@ -601,6 +601,7 @@ struct dev_pm_info {
unsigned
int
idle_notification
:
1
;
unsigned
int
request_pending
:
1
;
unsigned
int
deferred_resume
:
1
;
unsigned
int
needs_force_resume
:
1
;
unsigned
int
runtime_auto
:
1
;
bool
ignore_children
:
1
;
unsigned
int
no_callbacks
:
1
;
...
...
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