Skip to content

Commit 4778e12

Browse files
committed
Merge branch 'pm-cpufreq'
Merge a cpufreq fix for 6.5-rc6. This makes amd-pstate use device_attributes as expected by the CPU root kobject. * pm-cpufreq: cpufreq: amd-pstate: fix global sysfs attribute type
2 parents df2f7cd + 5e720f8 commit 4778e12

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

drivers/cpufreq/amd-pstate.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,8 +1012,8 @@ static int amd_pstate_update_status(const char *buf, size_t size)
10121012
return 0;
10131013
}
10141014

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)
10171017
{
10181018
ssize_t ret;
10191019

@@ -1024,7 +1024,7 @@ static ssize_t show_status(struct kobject *kobj,
10241024
return ret;
10251025
}
10261026

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,
10281028
const char *buf, size_t count)
10291029
{
10301030
char *p = memchr(buf, '\n', count);
@@ -1043,7 +1043,7 @@ cpufreq_freq_attr_ro(amd_pstate_lowest_nonlinear_freq);
10431043
cpufreq_freq_attr_ro(amd_pstate_highest_perf);
10441044
cpufreq_freq_attr_rw(energy_performance_preference);
10451045
cpufreq_freq_attr_ro(energy_performance_available_preferences);
1046-
define_one_global_rw(status);
1046+
static DEVICE_ATTR_RW(status);
10471047

10481048
static struct freq_attr *amd_pstate_attr[] = {
10491049
&amd_pstate_max_freq,
@@ -1062,7 +1062,7 @@ static struct freq_attr *amd_pstate_epp_attr[] = {
10621062
};
10631063

10641064
static struct attribute *pstate_global_attributes[] = {
1065-
&status.attr,
1065+
&dev_attr_status.attr,
10661066
NULL
10671067
};
10681068

0 commit comments

Comments
 (0)