Skip to contentSkip to conversation

PM, domain, Fix link checking when add subdomain

BUGFIX Huang Ying 2 participants 2 messages May 7, 2012

Subsystems (4)
lore
Share & tools
lore

Huang Ying

author
#0 lore raw

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.

---
 drivers/base/power/domain.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/base/power/domain.c +1 -1
@@ -1378,7 +1378,7 @@ int pm_genpd_add_subdomain(struct generi
 		goto out;
 	}
 
-	list_for_each_entry(link, &genpd->slave_links, slave_node) {
+	list_for_each_entry(link, &genpd->master_links, master_node) {
 		if (link->slave == subdomain && link->master == genpd) {
 			ret = -EINVAL;
 			goto out;
#1 lore raw
Quoted 8 lines · Huang Ying

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.

Thanks for the fix, applied to linux-pm/linux-next.

Thanks,
Rafael

Quoted 21 lines
---
 drivers/base/power/domain.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/base/power/domain.c +1 -2
@@ -1378,7 +1378,7 @@ int pm_genpd_add_subdomain(struct generi
 		goto out;
 	}
 
-	list_for_each_entry(link, &genpd->slave_links, slave_node) {
+	list_for_each_entry(link, &genpd->master_links, master_node) {
 		if (link->slave == subdomain && link->master == genpd) {
 			ret = -EINVAL;
 			goto out;
--

To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html