]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge tag 'pm-extra-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 10 Jul 2017 22:16:21 +0000 (15:16 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 10 Jul 2017 22:16:21 +0000 (15:16 -0700)
Pull more power management updates from Rafael Wysocki:
 "These revert one recent change in the generic power domains
  framework, fix a recently introduced build issue in there and
  constify attribute_group structures in some places.

  Specifics:

   - Revert a recent change in the generic power domains (genpd)
     framework that led to regressions and turned out the be misguided
     (Rafael Wysocki).

   - Fix a recently introduced build issue in the generic power domains
     (genpd) framework (Arnd Bergmann).

   - Constify attribute_group structures in the PM core, the cpufreq
     stats code and in intel_pstate (Arvind Yadav)"

* tag 'pm-extra-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  cpufreq: intel_pstate: constify attribute_group structures
  cpufreq: cpufreq_stats: constify attribute_group structures
  PM / sleep: constify attribute_group structures
  PM / Domains: provide pm_genpd_poweroff_noirq() stub
  Revert "PM / Domains: Handle safely genpd_syscore_switch() call on non-genpd device"

1  2 
drivers/base/power/domain.c

index 9649dce63e19068f853cb5a81ad19876b4775e55,7f374233b4980ee5d551670d7004896a8b7c1ef3..3b8210ebb50ebfd1844622a883193fecdacaa282
@@@ -1148,8 -1148,8 +1148,8 @@@ static void genpd_syscore_switch(struc
  {
        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) {
@@@ -1180,6 -1180,7 +1180,7 @@@ EXPORT_SYMBOL_GPL(pm_genpd_syscore_powe
  #define pm_genpd_resume_noirq         NULL
  #define pm_genpd_freeze_noirq         NULL
  #define pm_genpd_thaw_noirq           NULL
+ #define pm_genpd_poweroff_noirq               NULL
  #define pm_genpd_restore_noirq                NULL
  #define pm_genpd_complete             NULL
  
@@@ -1637,6 -1638,9 +1638,6 @@@ EXPORT_SYMBOL_GPL(pm_genpd_remove)
  
  #ifdef CONFIG_PM_GENERIC_DOMAINS_OF
  
 -typedef struct generic_pm_domain *(*genpd_xlate_t)(struct of_phandle_args *args,
 -                                                 void *data);
 -
  /*
   * Device Tree based PM domain providers.
   *
@@@ -1792,9 -1796,6 +1793,9 @@@ int of_genpd_add_provider_onecell(struc
  
        mutex_lock(&gpd_list_lock);
  
 +      if (!data->xlate)
 +              data->xlate = genpd_xlate_onecell;
 +
        for (i = 0; i < data->num_domains; i++) {
                if (!data->domains[i])
                        continue;
                data->domains[i]->has_provider = true;
        }
  
 -      ret = genpd_add_provider(np, genpd_xlate_onecell, data);
 +      ret = genpd_add_provider(np, data->xlate, data);
        if (ret < 0)
                goto error;