Skip to content

Commit 99adcd9

Browse files
committed
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq
* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq: [CPUFREQ] Add p4-clockmod sysfs-ui removal to feature-removal schedule. Revert "[CPUFREQ] Disable sysfs ui for p4-clockmod."
2 parents 2d5516c + 753b7ae commit 99adcd9

File tree

4 files changed

+27
-35
lines changed

4 files changed

+27
-35
lines changed

Documentation/feature-removal-schedule.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,3 +335,12 @@ Why: In 2.6.18 the Secmark concept was introduced to replace the "compat_net"
335335
Secmark, it is time to deprecate the older mechanism and start the
336336
process of removing the old code.
337337
Who: Paul Moore <paul.moore@hp.com>
338+
---------------------------
339+
340+
What: sysfs ui for changing p4-clockmod parameters
341+
When: September 2009
342+
Why: See commits 129f8ae9b1b5be94517da76009ea956e89104ce8 and
343+
e088e4c9cdb618675874becb91b2fd581ee707e6.
344+
Removal is subject to fixing any remaining bugs in ACPI which may
345+
cause the thermal throttling not to happen at the right time.
346+
Who: Dave Jones <davej@redhat.com>, Matthew Garrett <mjg@redhat.com>

arch/x86/kernel/cpu/cpufreq/p4-clockmod.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,6 @@ static struct cpufreq_driver p4clockmod_driver = {
277277
.name = "p4-clockmod",
278278
.owner = THIS_MODULE,
279279
.attr = p4clockmod_attr,
280-
.hide_interface = 1,
281280
};
282281

283282

drivers/cpufreq/cpufreq.c

Lines changed: 18 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -754,11 +754,6 @@ static struct kobj_type ktype_cpufreq = {
754754
.release = cpufreq_sysfs_release,
755755
};
756756

757-
static struct kobj_type ktype_empty_cpufreq = {
758-
.sysfs_ops = &sysfs_ops,
759-
.release = cpufreq_sysfs_release,
760-
};
761-
762757

763758
/**
764759
* cpufreq_add_dev - add a CPU device
@@ -892,36 +887,26 @@ static int cpufreq_add_dev(struct sys_device *sys_dev)
892887
memcpy(&new_policy, policy, sizeof(struct cpufreq_policy));
893888

894889
/* prepare interface data */
895-
if (!cpufreq_driver->hide_interface) {
896-
ret = kobject_init_and_add(&policy->kobj, &ktype_cpufreq,
897-
&sys_dev->kobj, "cpufreq");
890+
ret = kobject_init_and_add(&policy->kobj, &ktype_cpufreq, &sys_dev->kobj,
891+
"cpufreq");
892+
if (ret)
893+
goto err_out_driver_exit;
894+
895+
/* set up files for this cpu device */
896+
drv_attr = cpufreq_driver->attr;
897+
while ((drv_attr) && (*drv_attr)) {
898+
ret = sysfs_create_file(&policy->kobj, &((*drv_attr)->attr));
898899
if (ret)
899900
goto err_out_driver_exit;
900-
901-
/* set up files for this cpu device */
902-
drv_attr = cpufreq_driver->attr;
903-
while ((drv_attr) && (*drv_attr)) {
904-
ret = sysfs_create_file(&policy->kobj,
905-
&((*drv_attr)->attr));
906-
if (ret)
907-
goto err_out_driver_exit;
908-
drv_attr++;
909-
}
910-
if (cpufreq_driver->get) {
911-
ret = sysfs_create_file(&policy->kobj,
912-
&cpuinfo_cur_freq.attr);
913-
if (ret)
914-
goto err_out_driver_exit;
915-
}
916-
if (cpufreq_driver->target) {
917-
ret = sysfs_create_file(&policy->kobj,
918-
&scaling_cur_freq.attr);
919-
if (ret)
920-
goto err_out_driver_exit;
921-
}
922-
} else {
923-
ret = kobject_init_and_add(&policy->kobj, &ktype_empty_cpufreq,
924-
&sys_dev->kobj, "cpufreq");
901+
drv_attr++;
902+
}
903+
if (cpufreq_driver->get) {
904+
ret = sysfs_create_file(&policy->kobj, &cpuinfo_cur_freq.attr);
905+
if (ret)
906+
goto err_out_driver_exit;
907+
}
908+
if (cpufreq_driver->target) {
909+
ret = sysfs_create_file(&policy->kobj, &scaling_cur_freq.attr);
925910
if (ret)
926911
goto err_out_driver_exit;
927912
}

include/linux/cpufreq.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,6 @@ struct cpufreq_driver {
234234
int (*suspend) (struct cpufreq_policy *policy, pm_message_t pmsg);
235235
int (*resume) (struct cpufreq_policy *policy);
236236
struct freq_attr **attr;
237-
bool hide_interface;
238237
};
239238

240239
/* flags */

0 commit comments

Comments
 (0)