diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-07-22 16:11:16 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-07-22 16:11:16 -0400 |
commit | b2f8dc4ce6626e25b164e29cf72b70230a1f1711 (patch) | |
tree | 3fa8c909d05de2420bd47e4c1bb95b867f1999a1 | |
parent | 4bc384ae6299d3f3a948efabda2a423e2a293ee0 (diff) |
ACPI / processor: Drop an unused argument of a cleanup routine
acpi_processor_unregister_performance() actually doesn't use its
first argument, so drop it and update the callers accordingly.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
-rw-r--r-- | drivers/acpi/processor_perflib.c | 4 | ||||
-rw-r--r-- | drivers/cpufreq/acpi-cpufreq.c | 5 | ||||
-rw-r--r-- | drivers/cpufreq/e_powersaver.c | 2 | ||||
-rw-r--r-- | drivers/cpufreq/ia64-acpi-cpufreq.c | 5 | ||||
-rw-r--r-- | drivers/cpufreq/powernow-k7.c | 4 | ||||
-rw-r--r-- | drivers/cpufreq/powernow-k8.c | 5 | ||||
-rw-r--r-- | drivers/xen/xen-acpi-processor.c | 16 | ||||
-rw-r--r-- | include/acpi/processor.h | 5 |
8 files changed, 17 insertions, 29 deletions
diff --git a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perflib.c index cfc8aba72f86..36b6da2918a6 100644 --- a/drivers/acpi/processor_perflib.c +++ b/drivers/acpi/processor_perflib.c | |||
@@ -784,9 +784,7 @@ acpi_processor_register_performance(struct acpi_processor_performance | |||
784 | 784 | ||
785 | EXPORT_SYMBOL(acpi_processor_register_performance); | 785 | EXPORT_SYMBOL(acpi_processor_register_performance); |
786 | 786 | ||
787 | void | 787 | void acpi_processor_unregister_performance(unsigned int cpu) |
788 | acpi_processor_unregister_performance(struct acpi_processor_performance | ||
789 | *performance, unsigned int cpu) | ||
790 | { | 788 | { |
791 | struct acpi_processor *pr; | 789 | struct acpi_processor *pr; |
792 | 790 | ||
diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c index de54ce14eb39..ca9d0f6edf08 100644 --- a/drivers/cpufreq/acpi-cpufreq.c +++ b/drivers/cpufreq/acpi-cpufreq.c | |||
@@ -844,7 +844,7 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy) | |||
844 | err_freqfree: | 844 | err_freqfree: |
845 | kfree(data->freq_table); | 845 | kfree(data->freq_table); |
846 | err_unreg: | 846 | err_unreg: |
847 | acpi_processor_unregister_performance(perf, cpu); | 847 | acpi_processor_unregister_performance(cpu); |
848 | err_free_mask: | 848 | err_free_mask: |
849 | free_cpumask_var(data->freqdomain_cpus); | 849 | free_cpumask_var(data->freqdomain_cpus); |
850 | err_free: | 850 | err_free: |
@@ -862,8 +862,7 @@ static int acpi_cpufreq_cpu_exit(struct cpufreq_policy *policy) | |||
862 | 862 | ||
863 | if (data) { | 863 | if (data) { |
864 | policy->driver_data = NULL; | 864 | policy->driver_data = NULL; |
865 | acpi_processor_unregister_performance(data->acpi_data, | 865 | acpi_processor_unregister_performance(data->acpi_perf_cpu); |
866 | data->acpi_perf_cpu); | ||
867 | free_cpumask_var(data->freqdomain_cpus); | 866 | free_cpumask_var(data->freqdomain_cpus); |
868 | kfree(data->freq_table); | 867 | kfree(data->freq_table); |
869 | kfree(data); | 868 | kfree(data); |
diff --git a/drivers/cpufreq/e_powersaver.c b/drivers/cpufreq/e_powersaver.c index a0d2a423cea9..4085244c8a67 100644 --- a/drivers/cpufreq/e_powersaver.c +++ b/drivers/cpufreq/e_powersaver.c | |||
@@ -78,7 +78,7 @@ static int eps_acpi_init(void) | |||
78 | static int eps_acpi_exit(struct cpufreq_policy *policy) | 78 | static int eps_acpi_exit(struct cpufreq_policy *policy) |
79 | { | 79 | { |
80 | if (eps_acpi_cpu_perf) { | 80 | if (eps_acpi_cpu_perf) { |
81 | acpi_processor_unregister_performance(eps_acpi_cpu_perf, 0); | 81 | acpi_processor_unregister_performance(0); |
82 | free_cpumask_var(eps_acpi_cpu_perf->shared_cpu_map); | 82 | free_cpumask_var(eps_acpi_cpu_perf->shared_cpu_map); |
83 | kfree(eps_acpi_cpu_perf); | 83 | kfree(eps_acpi_cpu_perf); |
84 | eps_acpi_cpu_perf = NULL; | 84 | eps_acpi_cpu_perf = NULL; |
diff --git a/drivers/cpufreq/ia64-acpi-cpufreq.c b/drivers/cpufreq/ia64-acpi-cpufreq.c index c30aaa6a54e8..a9c193286ef4 100644 --- a/drivers/cpufreq/ia64-acpi-cpufreq.c +++ b/drivers/cpufreq/ia64-acpi-cpufreq.c | |||
@@ -313,7 +313,7 @@ acpi_cpufreq_cpu_init ( | |||
313 | err_freqfree: | 313 | err_freqfree: |
314 | kfree(data->freq_table); | 314 | kfree(data->freq_table); |
315 | err_unreg: | 315 | err_unreg: |
316 | acpi_processor_unregister_performance(&data->acpi_data, cpu); | 316 | acpi_processor_unregister_performance(cpu); |
317 | err_free: | 317 | err_free: |
318 | kfree(data); | 318 | kfree(data); |
319 | acpi_io_data[cpu] = NULL; | 319 | acpi_io_data[cpu] = NULL; |
@@ -332,8 +332,7 @@ acpi_cpufreq_cpu_exit ( | |||
332 | 332 | ||
333 | if (data) { | 333 | if (data) { |
334 | acpi_io_data[policy->cpu] = NULL; | 334 | acpi_io_data[policy->cpu] = NULL; |
335 | acpi_processor_unregister_performance(&data->acpi_data, | 335 | acpi_processor_unregister_performance(policy->cpu); |
336 | policy->cpu); | ||
337 | kfree(data); | 336 | kfree(data); |
338 | } | 337 | } |
339 | 338 | ||
diff --git a/drivers/cpufreq/powernow-k7.c b/drivers/cpufreq/powernow-k7.c index 37c5742482d8..c1ae1999770a 100644 --- a/drivers/cpufreq/powernow-k7.c +++ b/drivers/cpufreq/powernow-k7.c | |||
@@ -421,7 +421,7 @@ static int powernow_acpi_init(void) | |||
421 | return 0; | 421 | return 0; |
422 | 422 | ||
423 | err2: | 423 | err2: |
424 | acpi_processor_unregister_performance(acpi_processor_perf, 0); | 424 | acpi_processor_unregister_performance(0); |
425 | err1: | 425 | err1: |
426 | free_cpumask_var(acpi_processor_perf->shared_cpu_map); | 426 | free_cpumask_var(acpi_processor_perf->shared_cpu_map); |
427 | err05: | 427 | err05: |
@@ -661,7 +661,7 @@ static int powernow_cpu_exit(struct cpufreq_policy *policy) | |||
661 | { | 661 | { |
662 | #ifdef CONFIG_X86_POWERNOW_K7_ACPI | 662 | #ifdef CONFIG_X86_POWERNOW_K7_ACPI |
663 | if (acpi_processor_perf) { | 663 | if (acpi_processor_perf) { |
664 | acpi_processor_unregister_performance(acpi_processor_perf, 0); | 664 | acpi_processor_unregister_performance(0); |
665 | free_cpumask_var(acpi_processor_perf->shared_cpu_map); | 665 | free_cpumask_var(acpi_processor_perf->shared_cpu_map); |
666 | kfree(acpi_processor_perf); | 666 | kfree(acpi_processor_perf); |
667 | } | 667 | } |
diff --git a/drivers/cpufreq/powernow-k8.c b/drivers/cpufreq/powernow-k8.c index 5c035d04d827..0b5bf135b090 100644 --- a/drivers/cpufreq/powernow-k8.c +++ b/drivers/cpufreq/powernow-k8.c | |||
@@ -795,7 +795,7 @@ err_out_mem: | |||
795 | kfree(powernow_table); | 795 | kfree(powernow_table); |
796 | 796 | ||
797 | err_out: | 797 | err_out: |
798 | acpi_processor_unregister_performance(&data->acpi_data, data->cpu); | 798 | acpi_processor_unregister_performance(data->cpu); |
799 | 799 | ||
800 | /* data->acpi_data.state_count informs us at ->exit() | 800 | /* data->acpi_data.state_count informs us at ->exit() |
801 | * whether ACPI was used */ | 801 | * whether ACPI was used */ |
@@ -863,8 +863,7 @@ static int fill_powernow_table_fidvid(struct powernow_k8_data *data, | |||
863 | static void powernow_k8_cpu_exit_acpi(struct powernow_k8_data *data) | 863 | static void powernow_k8_cpu_exit_acpi(struct powernow_k8_data *data) |
864 | { | 864 | { |
865 | if (data->acpi_data.state_count) | 865 | if (data->acpi_data.state_count) |
866 | acpi_processor_unregister_performance(&data->acpi_data, | 866 | acpi_processor_unregister_performance(data->cpu); |
867 | data->cpu); | ||
868 | free_cpumask_var(data->acpi_data.shared_cpu_map); | 867 | free_cpumask_var(data->acpi_data.shared_cpu_map); |
869 | } | 868 | } |
870 | 869 | ||
diff --git a/drivers/xen/xen-acpi-processor.c b/drivers/xen/xen-acpi-processor.c index 59fc190f1e92..70fa438000af 100644 --- a/drivers/xen/xen-acpi-processor.c +++ b/drivers/xen/xen-acpi-processor.c | |||
@@ -560,11 +560,9 @@ static int __init xen_acpi_processor_init(void) | |||
560 | 560 | ||
561 | return 0; | 561 | return 0; |
562 | err_unregister: | 562 | err_unregister: |
563 | for_each_possible_cpu(i) { | 563 | for_each_possible_cpu(i) |
564 | struct acpi_processor_performance *perf; | 564 | acpi_processor_unregister_performance(i); |
565 | perf = per_cpu_ptr(acpi_perf_data, i); | 565 | |
566 | acpi_processor_unregister_performance(perf, i); | ||
567 | } | ||
568 | err_out: | 566 | err_out: |
569 | /* Freeing a NULL pointer is OK: alloc_percpu zeroes. */ | 567 | /* Freeing a NULL pointer is OK: alloc_percpu zeroes. */ |
570 | free_acpi_perf_data(); | 568 | free_acpi_perf_data(); |
@@ -579,11 +577,9 @@ static void __exit xen_acpi_processor_exit(void) | |||
579 | kfree(acpi_ids_done); | 577 | kfree(acpi_ids_done); |
580 | kfree(acpi_id_present); | 578 | kfree(acpi_id_present); |
581 | kfree(acpi_id_cst_present); | 579 | kfree(acpi_id_cst_present); |
582 | for_each_possible_cpu(i) { | 580 | for_each_possible_cpu(i) |
583 | struct acpi_processor_performance *perf; | 581 | acpi_processor_unregister_performance(i); |
584 | perf = per_cpu_ptr(acpi_perf_data, i); | 582 | |
585 | acpi_processor_unregister_performance(perf, i); | ||
586 | } | ||
587 | free_acpi_perf_data(); | 583 | free_acpi_perf_data(); |
588 | } | 584 | } |
589 | 585 | ||
diff --git a/include/acpi/processor.h b/include/acpi/processor.h index 4188a4d3b597..aad1f2a3cd2b 100644 --- a/include/acpi/processor.h +++ b/include/acpi/processor.h | |||
@@ -228,10 +228,7 @@ extern int acpi_processor_preregister_performance(struct | |||
228 | 228 | ||
229 | extern int acpi_processor_register_performance(struct acpi_processor_performance | 229 | extern int acpi_processor_register_performance(struct acpi_processor_performance |
230 | *performance, unsigned int cpu); | 230 | *performance, unsigned int cpu); |
231 | extern void acpi_processor_unregister_performance(struct | 231 | extern void acpi_processor_unregister_performance(unsigned int cpu); |
232 | acpi_processor_performance | ||
233 | *performance, | ||
234 | unsigned int cpu); | ||
235 | 232 | ||
236 | /* note: this locks both the calling module and the processor module | 233 | /* note: this locks both the calling module and the processor module |
237 | if a _PPC object exists, rmmod is disallowed then */ | 234 | if a _PPC object exists, rmmod is disallowed then */ |