diff options
author | Dave Jones <davej@redhat.com> | 2009-03-09 15:07:33 -0400 |
---|---|---|
committer | Dave Jones <davej@redhat.com> | 2009-03-09 15:07:33 -0400 |
commit | 129f8ae9b1b5be94517da76009ea956e89104ce8 (patch) | |
tree | f79cbe8397dd2578349d3aefe25dc72f26eab291 /drivers/cpufreq/cpufreq.c | |
parent | 694593e3374a67d95ece6a275a1f181644c2c4d8 (diff) |
Revert "[CPUFREQ] Disable sysfs ui for p4-clockmod."
This reverts commit e088e4c9cdb618675874becb91b2fd581ee707e6.
Removing the sysfs interface for p4-clockmod was flagged as a
regression in bug 12826.
Course of action:
- Find out the remaining causes of overheating, and fix them
if possible. ACPI should be doing the right thing automatically.
If it isn't, we need to fix that.
- mark p4-clockmod ui as deprecated
- try again with the removal in six months.
It's not really feasible to printk about the deprecation, because
it needs to happen at all the sysfs entry points, which means adding
a lot of strcmp("p4-clockmod".. calls to the core, which.. bleuch.
Signed-off-by: Dave Jones <davej@redhat.com>
Diffstat (limited to 'drivers/cpufreq/cpufreq.c')
-rw-r--r-- | drivers/cpufreq/cpufreq.c | 51 |
1 files changed, 18 insertions, 33 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index b55cb67435bd..d6daf3c507d3 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c | |||
@@ -754,11 +754,6 @@ static struct kobj_type ktype_cpufreq = { | |||
754 | .release = cpufreq_sysfs_release, | 754 | .release = cpufreq_sysfs_release, |
755 | }; | 755 | }; |
756 | 756 | ||
757 | static struct kobj_type ktype_empty_cpufreq = { | ||
758 | .sysfs_ops = &sysfs_ops, | ||
759 | .release = cpufreq_sysfs_release, | ||
760 | }; | ||
761 | |||
762 | 757 | ||
763 | /** | 758 | /** |
764 | * cpufreq_add_dev - add a CPU device | 759 | * cpufreq_add_dev - add a CPU device |
@@ -892,36 +887,26 @@ static int cpufreq_add_dev(struct sys_device *sys_dev) | |||
892 | memcpy(&new_policy, policy, sizeof(struct cpufreq_policy)); | 887 | memcpy(&new_policy, policy, sizeof(struct cpufreq_policy)); |
893 | 888 | ||
894 | /* prepare interface data */ | 889 | /* prepare interface data */ |
895 | if (!cpufreq_driver->hide_interface) { | 890 | ret = kobject_init_and_add(&policy->kobj, &ktype_cpufreq, &sys_dev->kobj, |
896 | ret = kobject_init_and_add(&policy->kobj, &ktype_cpufreq, | 891 | "cpufreq"); |
897 | &sys_dev->kobj, "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)); | ||
898 | if (ret) | 899 | if (ret) |
899 | goto err_out_driver_exit; | 900 | goto err_out_driver_exit; |
900 | 901 | drv_attr++; | |
901 | /* set up files for this cpu device */ | 902 | } |
902 | drv_attr = cpufreq_driver->attr; | 903 | if (cpufreq_driver->get) { |
903 | while ((drv_attr) && (*drv_attr)) { | 904 | ret = sysfs_create_file(&policy->kobj, &cpuinfo_cur_freq.attr); |
904 | ret = sysfs_create_file(&policy->kobj, | 905 | if (ret) |
905 | &((*drv_attr)->attr)); | 906 | goto err_out_driver_exit; |
906 | if (ret) | 907 | } |
907 | goto err_out_driver_exit; | 908 | if (cpufreq_driver->target) { |
908 | drv_attr++; | 909 | ret = sysfs_create_file(&policy->kobj, &scaling_cur_freq.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"); | ||
925 | if (ret) | 910 | if (ret) |
926 | goto err_out_driver_exit; | 911 | goto err_out_driver_exit; |
927 | } | 912 | } |