mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [BUGFIX] PM, domain, Fix link checking when add subdomain
@ 2012-05-07  5:28 Huang Ying
  2012-05-07 19:46 ` Rafael J. Wysocki
  0 siblings, 1 reply; 2+ messages in thread
From: Huang Ying @ 2012-05-07  5:28 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: ming.m.lin, linux-kernel, linux-pm, 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.

Signed-off-by: Huang Ying <ying.huang@intel.com>
---
 drivers/base/power/domain.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
@@ -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;

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-05-07 19:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-07  5:28 [BUGFIX] PM, domain, Fix link checking when add subdomain Huang Ying
2012-05-07 19:46 ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®