--- initial
+++ final
@@ -1,148 +1,147 @@
 static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy) {
   unsigned int i;
   unsigned int valid_states = 0;
   unsigned int cpu = policy->cpu;
   struct acpi_cpufreq_data *data;
   unsigned int result = 0;
   struct cpuinfo_x86 *c = &cpu_data(policy->cpu);
   struct acpi_processor_performance *perf;
 #ifdef CONFIG_SMP
   static int blacklisted;
 #endif
   pr_debug("acpi_cpufreq_cpu_init\n");
 #ifdef CONFIG_SMP
   if (blacklisted) return blacklisted;
   blacklisted = acpi_cpufreq_blacklist(c);
   if (blacklisted) return blacklisted;
 #endif
   data = kzalloc(sizeof(*data), GFP_KERNEL);
   if (!data) return -ENOMEM;
   if (!zalloc_cpumask_var(&data->freqdomain_cpus, GFP_KERNEL)) {
     result = -ENOMEM;
     goto err_free;
   }
   data->acpi_data = per_cpu_ptr(acpi_perf_data, cpu);
   per_cpu(acfreq_data, cpu) = data;
   if (cpu_has(c, X86_FEATURE_CONSTANT_TSC)) acpi_cpufreq_driver.flags |= CPUFREQ_CONST_LOOPS;
   result = acpi_processor_register_performance(data->acpi_data, cpu);
   if (result) goto err_free_mask;
   perf = data->acpi_data;
   policy->shared_type = perf->shared_type;
   /*
    * Will let policy->cpus know about dependency only when software
    * coordination is required.
    */
   if (policy->shared_type == CPUFREQ_SHARED_TYPE_ALL || policy->shared_type == CPUFREQ_SHARED_TYPE_ANY) { cpumask_copy(policy->cpus, perf->shared_cpu_map); }
   cpumask_copy(data->freqdomain_cpus, perf->shared_cpu_map);
 #ifdef CONFIG_SMP
   dmi_check_system(sw_any_bug_dmi_table);
   if (bios_with_sw_any_bug && !policy_is_shared(policy)) {
     policy->shared_type = CPUFREQ_SHARED_TYPE_ALL;
     cpumask_copy(policy->cpus, cpu_core_mask(cpu));
   }
   if (check_amd_hwpstate_cpu(cpu) && !acpi_pstate_strict) {
     cpumask_clear(policy->cpus);
     cpumask_set_cpu(cpu, policy->cpus);
     cpumask_copy(data->freqdomain_cpus, cpu_sibling_mask(cpu));
     policy->shared_type = CPUFREQ_SHARED_TYPE_HW;
     pr_info_once(PFX "overriding BIOS provided _PSD data\n");
   }
 #endif
   /* capability check */
   if (perf->state_count <= 1) {
     pr_debug("No P-States\n");
     result = -ENODEV;
     goto err_unreg;
   }
   if (perf->control_register.space_id != perf->status_register.space_id) {
     result = -ENODEV;
     goto err_unreg;
   }
   switch (perf->control_register.space_id) {
   case ACPI_ADR_SPACE_SYSTEM_IO:
     if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD && boot_cpu_data.x86 == 0xf) {
       pr_debug("AMD K8 systems must use native drivers.\n");
       result = -ENODEV;
       goto err_unreg;
     }
     pr_debug("SYSTEM IO addr space\n");
     data->cpu_feature = SYSTEM_IO_CAPABLE;
     break;
   case ACPI_ADR_SPACE_FIXED_HARDWARE:
     pr_debug("HARDWARE addr space\n");
     if (check_est_cpu(cpu)) {
       data->cpu_feature = SYSTEM_INTEL_MSR_CAPABLE;
       break;
     }
     if (check_amd_hwpstate_cpu(cpu)) {
       data->cpu_feature = SYSTEM_AMD_MSR_CAPABLE;
       break;
     }
     result = -ENODEV;
     goto err_unreg;
   default:
     pr_debug("Unknown addr space %d\n", (u32)(perf->control_register.space_id));
     result = -ENODEV;
     goto err_unreg;
   }
   data->freq_table = kmalloc(sizeof(*data->freq_table) * (perf->state_count + 1), GFP_KERNEL);
   if (!data->freq_table) {
     result = -ENOMEM;
     goto err_unreg;
   }
   /* detect transition latency */
   policy->cpuinfo.transition_latency = 0;
   for (i = 0; i < perf->state_count; i++) {
     if ((perf->states[i].transition_latency * 1000) > policy->cpuinfo.transition_latency) policy->cpuinfo.transition_latency = perf->states[i].transition_latency * 1000;
   }
   /* Check for high latency (>20uS) from buggy BIOSes, like on T42 */
   if (perf->control_register.space_id == ACPI_ADR_SPACE_FIXED_HARDWARE && policy->cpuinfo.transition_latency > 20 * 1000) {
     policy->cpuinfo.transition_latency = 20 * 1000;
     printk_once(KERN_INFO "P-state transition latency capped at 20 uS\n");
   }
   /* table init */
   for (i = 0; i < perf->state_count; i++) {
     if (i > 0 && perf->states[i].core_frequency >= data->freq_table[valid_states - 1].frequency / 1000) continue;
     data->freq_table[valid_states].driver_data = i;
     data->freq_table[valid_states].frequency = perf->states[i].core_frequency * 1000;
     valid_states++;
   }
   data->freq_table[valid_states].frequency = CPUFREQ_TABLE_END;
   perf->state = 0;
-  result = cpufreq_frequency_table_cpuinfo(policy, data->freq_table);
+  result = cpufreq_table_validate_and_show(policy, data->freq_table);
   if (result) goto err_freqfree;
   if (perf->states[0].core_frequency * 1000 != policy->cpuinfo.max_freq) printk(KERN_WARNING FW_WARN "P-state 0 is not max freq\n");
   switch (perf->control_register.space_id) {
   case ACPI_ADR_SPACE_SYSTEM_IO:
     /* Current speed is unknown and not detectable by IO port */
     policy->cur = acpi_cpufreq_guess_freq(data, policy->cpu);
     break;
   case ACPI_ADR_SPACE_FIXED_HARDWARE:
     acpi_cpufreq_driver.get = get_cur_freq_on_cpu;
     policy->cur = get_cur_freq_on_cpu(cpu);
     break;
   default: break;
   }
   /* notify BIOS that we exist */
   acpi_processor_notify_smm(THIS_MODULE);
   pr_debug("CPU%u - ACPI performance management activated.\n", cpu);
   for (i = 0; i < perf->state_count; i++)
     pr_debug("     %cP%d: %d MHz, %d mW, %d uS\n", (i == perf->state ? '*' : ' '), i, (u32)perf->states[i].core_frequency, (u32)perf->states[i].power, (u32)perf->states[i].transition_latency);
-  cpufreq_frequency_table_get_attr(data->freq_table, policy->cpu);
   /*
    * the first call to ->target() should result in us actually
    * writing something to the appropriate registers.
    */
   data->resume = 1;
   return result;
 err_freqfree:
   kfree(data->freq_table);
 err_unreg:
   acpi_processor_unregister_performance(perf, cpu);
 err_free_mask:
   free_cpumask_var(data->freqdomain_cpus);
 err_free:
   kfree(data);
   per_cpu(acfreq_data, cpu) = NULL;
   return result;
 }<sep>@@
expression policy,table;
@@

-       cpufreq_frequency_table_cpuinfo
+       cpufreq_table_validate_and_show
		(policy, table)
...
-       cpufreq_frequency_table_get_attr(table, policy->cpu);