diff options
author | Huang Ying <ying.huang@intel.com> | 2012-05-07 15:35:45 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2012-05-11 15:11:37 -0400 |
commit | 4fcac10d28e7a046120b51a106b19082d2e57401 (patch) | |
tree | a9b1d178e6d1c8c9bc4c2ed383a4b64f1dfd078c /drivers/base/power | |
parent | 6ff7bb0d02f82968be13937c03e93b6c090229df (diff) |
PM / Domains: Fix link checking when add subdomain
Current pm_genpd_add_subdomain() will allow duplicated link between
master and slave domain. This patch fixed it.
Because when current pm_genpd_add_subdomain() checks whether the link
between the master and slave generic PM domain already exists,
slave_links instead of master_links of master domain is used.
Signed-off-by: Huang Ying <ying.huang@intel.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'drivers/base/power')
-rw-r--r-- | drivers/base/power/domain.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index cde5983de6c2..c3eaa08a8f96 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c | |||
@@ -1448,7 +1448,7 @@ int pm_genpd_add_subdomain(struct generic_pm_domain *genpd, | |||
1448 | goto out; | 1448 | goto out; |
1449 | } | 1449 | } |
1450 | 1450 | ||
1451 | list_for_each_entry(link, &genpd->slave_links, slave_node) { | 1451 | list_for_each_entry(link, &genpd->master_links, master_node) { |
1452 | if (link->slave == subdomain && link->master == genpd) { | 1452 | if (link->slave == subdomain && link->master == genpd) { |
1453 | ret = -EINVAL; | 1453 | ret = -EINVAL; |
1454 | goto out; | 1454 | goto out; |