aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathias Krause <minipli@googlemail.com>2015-03-25 17:16:24 -0400
committerZhang Rui <rui.zhang@intel.com>2015-05-09 01:36:55 -0400
commit4d2b6e4a9ebc2907e4a64fa240d8b67c7051e997 (patch)
tree257e0494b2244fcf25a30ee807a497c95a55d937
parentce1d94919de3ffc1769b327792ea0189db6e7551 (diff)
thermal/intel_powerclamp: add __init / __exit annotations
Mark the module init / exit functions with __init / __exit accodingly. This allows making the intel_powerclamp_ids[] array __initconst, too, as it only gets referenced from powerclamp_probe(). This is safe as file2alias doesn't care about the section, but the symbol name for the MODULE_DEVICE_TABLE alias. Cc: Arjan van de Ven <arjan@linux.intel.com> Cc: Jacob Pan <jacob.jun.pan@linux.intel.com> Signed-off-by: Mathias Krause <minipli@googlemail.com> Acked-by: Jacob Pan <jacob.jun.pan@linux.intel.com> Acked-by: Jacob Pan <jacob.jun.pan@linux.intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
-rw-r--r--drivers/thermal/intel_powerclamp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/thermal/intel_powerclamp.c b/drivers/thermal/intel_powerclamp.c
index 12623bc02f46..b0f7ced5c3ef 100644
--- a/drivers/thermal/intel_powerclamp.c
+++ b/drivers/thermal/intel_powerclamp.c
@@ -667,7 +667,7 @@ static struct thermal_cooling_device_ops powerclamp_cooling_ops = {
667}; 667};
668 668
669/* runs on Nehalem and later */ 669/* runs on Nehalem and later */
670static const struct x86_cpu_id intel_powerclamp_ids[] = { 670static const struct x86_cpu_id intel_powerclamp_ids[] __initconst = {
671 { X86_VENDOR_INTEL, 6, 0x1a}, 671 { X86_VENDOR_INTEL, 6, 0x1a},
672 { X86_VENDOR_INTEL, 6, 0x1c}, 672 { X86_VENDOR_INTEL, 6, 0x1c},
673 { X86_VENDOR_INTEL, 6, 0x1e}, 673 { X86_VENDOR_INTEL, 6, 0x1e},
@@ -694,7 +694,7 @@ static const struct x86_cpu_id intel_powerclamp_ids[] = {
694}; 694};
695MODULE_DEVICE_TABLE(x86cpu, intel_powerclamp_ids); 695MODULE_DEVICE_TABLE(x86cpu, intel_powerclamp_ids);
696 696
697static int powerclamp_probe(void) 697static int __init powerclamp_probe(void)
698{ 698{
699 if (!x86_match_cpu(intel_powerclamp_ids)) { 699 if (!x86_match_cpu(intel_powerclamp_ids)) {
700 pr_err("Intel powerclamp does not run on family %d model %d\n", 700 pr_err("Intel powerclamp does not run on family %d model %d\n",
@@ -760,7 +760,7 @@ file_error:
760 debugfs_remove_recursive(debug_dir); 760 debugfs_remove_recursive(debug_dir);
761} 761}
762 762
763static int powerclamp_init(void) 763static int __init powerclamp_init(void)
764{ 764{
765 int retval; 765 int retval;
766 int bitmap_size; 766 int bitmap_size;
@@ -809,7 +809,7 @@ exit_free:
809} 809}
810module_init(powerclamp_init); 810module_init(powerclamp_init);
811 811
812static void powerclamp_exit(void) 812static void __exit powerclamp_exit(void)
813{ 813{
814 unregister_hotcpu_notifier(&powerclamp_cpu_notifier); 814 unregister_hotcpu_notifier(&powerclamp_cpu_notifier);
815 end_power_clamp(); 815 end_power_clamp();