• Jon Hunter's avatar
    PM / Domains: Prepare for adding support to remove PM domains · 19efa5ff
    Jon Hunter authored
    In order to remove PM domains safely from the list of PM domains,
    it is necessary to adding locking for the PM domain list around any
    places where devices or subdomains are added to a PM domain.
    
    There are places where a reference to a PM domain is obtained via
    calling of_genpd_get_from_provider() before adding the device or the
    subdomain. In these cases a lock for the PM domain list needs to be
    held around the call to of_genpd_get_from_provider() and the call to
    add the device/subdomain. To avoid deadlocks by multiple attempts to
    obtain the PM domain list lock, add functions genpd_add_device() and
    genpd_add_subdomain() which require the user to hold the PM domain
    list lock when calling.
    Signed-off-by: default avatarJon Hunter <jonathanh@nvidia.com>
    Acked-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    19efa5ff
domain.c 48.6 KB