Skip to content

Commit 1633b39

Browse files
committed
Merge tag 'pm-extra-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
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"
2 parents 5cdd4c0 + 15d56b3 commit 1633b39

4 files changed

Lines changed: 6 additions & 5 deletions

File tree

‎drivers/base/power/domain.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1148,8 +1148,8 @@ static void genpd_syscore_switch(struct device *dev, bool suspend)
11481148
{
11491149
struct generic_pm_domain *genpd;
11501150

1151-
genpd = genpd_lookup_dev(dev);
1152-
if (!genpd)
1151+
genpd = dev_to_genpd(dev);
1152+
if (!pm_genpd_present(genpd))
11531153
return;
11541154

11551155
if (suspend) {
@@ -1180,6 +1180,7 @@ EXPORT_SYMBOL_GPL(pm_genpd_syscore_poweron);
11801180
#define pm_genpd_resume_noirq NULL
11811181
#define pm_genpd_freeze_noirq NULL
11821182
#define pm_genpd_thaw_noirq NULL
1183+
#define pm_genpd_poweroff_noirq NULL
11831184
#define pm_genpd_restore_noirq NULL
11841185
#define pm_genpd_complete NULL
11851186

‎drivers/cpufreq/cpufreq_stats.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ static struct attribute *default_attrs[] = {
135135
&trans_table.attr,
136136
NULL
137137
};
138-
static struct attribute_group stats_attr_group = {
138+
static const struct attribute_group stats_attr_group = {
139139
.attrs = default_attrs,
140140
.name = "stats"
141141
};

‎drivers/cpufreq/intel_pstate.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1214,7 +1214,7 @@ static struct attribute *intel_pstate_attributes[] = {
12141214
NULL
12151215
};
12161216

1217-
static struct attribute_group intel_pstate_attr_group = {
1217+
static const struct attribute_group intel_pstate_attr_group = {
12181218
.attrs = intel_pstate_attributes,
12191219
};
12201220

‎kernel/power/main.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ static struct attribute * g[] = {
705705
NULL,
706706
};
707707

708-
static struct attribute_group attr_group = {
708+
static const struct attribute_group attr_group = {
709709
.attrs = g,
710710
};
711711

0 commit comments

Comments
 (0)