@@ -1012,8 +1012,8 @@ static int amd_pstate_update_status(const char *buf, size_t size)
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,7 +1024,7 @@ static ssize_t show_status(struct kobject *kobj,
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,7 +1043,7 @@ cpufreq_freq_attr_ro(amd_pstate_lowest_nonlinear_freq);
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,7 +1062,7 @@ static struct freq_attr *amd_pstate_epp_attr[] = {
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
0 commit comments