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 <geert@linux-m68k.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
{
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) {