Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'pm-6.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull power management fixes from Rafael Wysocki:
"These fix an amd-pstate cpufreq driver issues and recently introduced
hibernation-related breakage.

Specifics:

- Make amd-pstate use device_attributes as expected by the CPU root
kobject (Thomas Weißschuh)

- Restore the previous behavior of resume_store() when hibernation is
not available which is to return the full number of bytes that were
to be written by user space (Vlastimil Babka)"

* tag 'pm-6.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
cpufreq: amd-pstate: fix global sysfs attribute type
PM: hibernate: fix resume_store() return value when hibernation not available

+6 -6
+5 -5
drivers/cpufreq/amd-pstate.c
··· 1012 1012 return 0; 1013 1013 } 1014 1014 1015 - static ssize_t show_status(struct kobject *kobj, 1016 - struct kobj_attribute *attr, char *buf) 1015 + static ssize_t status_show(struct device *dev, 1016 + struct device_attribute *attr, char *buf) 1017 1017 { 1018 1018 ssize_t ret; 1019 1019 ··· 1024 1024 return ret; 1025 1025 } 1026 1026 1027 - static ssize_t store_status(struct kobject *a, struct kobj_attribute *b, 1027 + static ssize_t status_store(struct device *a, struct device_attribute *b, 1028 1028 const char *buf, size_t count) 1029 1029 { 1030 1030 char *p = memchr(buf, '\n', count); ··· 1043 1043 cpufreq_freq_attr_ro(amd_pstate_highest_perf); 1044 1044 cpufreq_freq_attr_rw(energy_performance_preference); 1045 1045 cpufreq_freq_attr_ro(energy_performance_available_preferences); 1046 - define_one_global_rw(status); 1046 + static DEVICE_ATTR_RW(status); 1047 1047 1048 1048 static struct freq_attr *amd_pstate_attr[] = { 1049 1049 &amd_pstate_max_freq, ··· 1062 1062 }; 1063 1063 1064 1064 static struct attribute *pstate_global_attributes[] = { 1065 - &status.attr, 1065 + &dev_attr_status.attr, 1066 1066 NULL 1067 1067 }; 1068 1068
+1 -1
kernel/power/hibernate.c
··· 1166 1166 int error; 1167 1167 1168 1168 if (!hibernation_available()) 1169 - return 0; 1169 + return n; 1170 1170 1171 1171 if (len && buf[len-1] == '\n') 1172 1172 len--;