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
112a04f6
Commit
112a04f6
authored
Mar 22, 2019
by
Rafael J. Wysocki
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'pm-domains' into pm
* pm-domains: PM / Domains: Avoid a potential deadlock
parents
2a954966
2071ac98
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
drivers/base/power/domain.c
drivers/base/power/domain.c
+6
-7
No files found.
drivers/base/power/domain.c
View file @
112a04f6
...
...
@@ -1469,12 +1469,12 @@ static int genpd_add_device(struct generic_pm_domain *genpd, struct device *dev,
if
(
IS_ERR
(
gpd_data
))
return
PTR_ERR
(
gpd_data
);
genpd_lock
(
genpd
);
ret
=
genpd
->
attach_dev
?
genpd
->
attach_dev
(
genpd
,
dev
)
:
0
;
if
(
ret
)
goto
out
;
genpd_lock
(
genpd
);
dev_pm_domain_set
(
dev
,
&
genpd
->
domain
);
genpd
->
device_count
++
;
...
...
@@ -1482,9 +1482,8 @@ static int genpd_add_device(struct generic_pm_domain *genpd, struct device *dev,
list_add_tail
(
&
gpd_data
->
base
.
list_node
,
&
genpd
->
dev_list
);
out:
genpd_unlock
(
genpd
);
out:
if
(
ret
)
genpd_free_dev_data
(
dev
,
gpd_data
);
else
...
...
@@ -1533,15 +1532,15 @@ static int genpd_remove_device(struct generic_pm_domain *genpd,
genpd
->
device_count
--
;
genpd
->
max_off_time_changed
=
true
;
if
(
genpd
->
detach_dev
)
genpd
->
detach_dev
(
genpd
,
dev
);
dev_pm_domain_set
(
dev
,
NULL
);
list_del_init
(
&
pdd
->
list_node
);
genpd_unlock
(
genpd
);
if
(
genpd
->
detach_dev
)
genpd
->
detach_dev
(
genpd
,
dev
);
genpd_free_dev_data
(
dev
,
gpd_data
);
return
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