]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
PM / Domains: Fix removal of a subdomain
authorJon Hunter <jonathanh@nvidia.com>
Fri, 4 Mar 2016 10:55:14 +0000 (10:55 +0000)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 8 Mar 2016 23:41:06 +0000 (00:41 +0100)
commitbeda5fc1ff9b527059290a97b672d2ee0eb7b92f
tree9e382005247e2f4b4d90550852af87780e36f5bc
parent076395cae20381340a0e92ad3d76fe3e280f8a1c
PM / Domains: Fix removal of a subdomain

Commit 30e7a65b3fdb (PM / Domains: Ensure subdomain is not in use
before removing) added a test to ensure that a subdomain is not a
master to another subdomain or if any devices are using the subdomain
before removing. This change incorrectly used the "slave_links" list to
determine if the subdomain is a master to another subdomain, where it
should have been using the "master_links" list instead. The
"slave_links" list will never be empty for a subdomain and so a
subdomain can never be removed. Fix this by testing if the
"master_links" list is empty instead.

Fixes: 30e7a65b3fdb (PM / Domains: Ensure subdomain is not in use before removing)
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/base/power/domain.c