diff options
| author | Lifeng Zheng <zhenglifeng1@huawei.com> | 2025-06-23 16:33:58 +0300 | 
|---|---|---|
| committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2025-07-14 20:38:10 +0300 | 
| commit | 2e554cfa259fe07085a4fcff7d2ec4b7041bbd9c (patch) | |
| tree | 0675cfcadf7245e7a83a0a53d3098e84dccf3e1f | |
| parent | fc64e0421598aaa87d61184f6777b52614a095be (diff) | |
| download | linux-2e554cfa259fe07085a4fcff7d2ec4b7041bbd9c.tar.xz | |
cpufreq: Contain scaling_cur_freq.attr in cpufreq_attrs
After commit c034b02e213d ("cpufreq: expose scaling_cur_freq sysfs file
for set_policy() drivers"), the file scaling_cur_freq is exposed to all
drivers.
No need to create this file separately. It's better to be contained in
cpufreq_attrs.
Signed-off-by: Lifeng Zheng <zhenglifeng1@huawei.com>
Link: https://patch.msgid.link/20250623133402.3120230-4-zhenglifeng1@huawei.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| -rw-r--r-- | drivers/cpufreq/cpufreq.c | 5 | 
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index d7426e1d8bdd..5560c7df0347 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -967,6 +967,7 @@ static struct attribute *cpufreq_attrs[] = {  	&cpuinfo_min_freq.attr,  	&cpuinfo_max_freq.attr,  	&cpuinfo_transition_latency.attr, +	&scaling_cur_freq.attr,  	&scaling_min_freq.attr,  	&scaling_max_freq.attr,  	&affected_cpus.attr, @@ -1095,10 +1096,6 @@ static int cpufreq_add_dev_interface(struct cpufreq_policy *policy)  			return ret;  	} -	ret = sysfs_create_file(&policy->kobj, &scaling_cur_freq.attr); -	if (ret) -		return ret; -  	if (cpufreq_driver->bios_limit) {  		ret = sysfs_create_file(&policy->kobj, &bios_limit.attr);  		if (ret)  | 
