diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index 9649dce63e19068f853cb5a81ad19876b4775e55..3b8210ebb50ebfd1844622a883193fecdacaa282 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) { @@ -1180,6 +1180,7 @@ EXPORT_SYMBOL_GPL(pm_genpd_syscore_poweron); #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 diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c index f570ead624547e111d74911e722b31aabcfce117..d362739a71f3701e42d55f2ef508023c4de96cb2 100644 --- a/drivers/cpufreq/cpufreq_stats.c +++ b/drivers/cpufreq/cpufreq_stats.c @@ -135,7 +135,7 @@ static struct attribute *default_attrs[] = { &trans_table.attr, NULL }; -static struct attribute_group stats_attr_group = { +static const struct attribute_group stats_attr_group = { .attrs = default_attrs, .name = "stats" }; diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index 48a98f11a84ee79b9ccabcff6c6865a0c51a6e26..d6f323560da39f87d1219a158aabfaf35ceea07d 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c @@ -1214,7 +1214,7 @@ static struct attribute *intel_pstate_attributes[] = { NULL }; -static struct attribute_group intel_pstate_attr_group = { +static const struct attribute_group intel_pstate_attr_group = { .attrs = intel_pstate_attributes, }; diff --git a/kernel/power/main.c b/kernel/power/main.c index d401c21136d1c80b1996ce1c19c5b8f26bcf8adf..42bd800a6755be14cea9a296aa5c7db57bd7fdea 100644 --- a/kernel/power/main.c +++ b/kernel/power/main.c @@ -705,7 +705,7 @@ static struct attribute * g[] = { NULL, }; -static struct attribute_group attr_group = { +static const struct attribute_group attr_group = { .attrs = g, };