From: Rafael J. Wysocki Date: Tue, 4 Jul 2017 19:55:13 +0000 (+0200) Subject: Revert "PM / Domains: Handle safely genpd_syscore_switch() call on non-genpd device" X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=23c6d2c73f4c7b1074e21fb3be8220fd677b1f7e;p=openwrt%2Fstaging%2Fblogic.git Revert "PM / Domains: Handle safely genpd_syscore_switch() call on non-genpd device" Revert commit 8b55e55ee443 (PM / Domains: Handle safely genpd_syscore_switch() call on non-genpd device) which was misguided (the change made by it was not necessary) and it introduced a call to a function that may sleep into an atomic context code path. Reported-by: Geert Uytterhoeven Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index e342408cfb8d..b463859f185f 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -1148,8 +1148,8 @@ static void genpd_syscore_switch(struct device *dev, bool suspend) { struct generic_pm_domain *genpd; - genpd = genpd_lookup_dev(dev); - if (!genpd) + genpd = dev_to_genpd(dev); + if (!pm_genpd_present(genpd)) return; if (suspend) {