Skip to contentSkip to conversation

intel_idle: mark some functions with __init tag

PATCH In review Bartlomiej Zolnierkiewicz 2 participants 2 messages Aug 30, 2013 – Sep 2, 2013 Intel idle driver

lore
Share & tools
lore
#0 lore raw

PATCH 3/3 intel_idle: mark some functions with __init tag

intel_idle_probe() and intel_idle_cpuidle_driver_init() can be marked with __init tag as they are only called from intel_idle_init().

---
 drivers/idle/intel_idle.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/idle/intel_idle.c +2 -2
index 53b24f1..33e599e 100644
@@ -490,7 +490,7 @@ MODULE_DEVICE_TABLE(x86cpu, intel_idle_ids);
 /*
  * intel_idle_probe()
  */
-static int intel_idle_probe(void)
+static int __init intel_idle_probe(void)
 {
 	unsigned int eax, ebx, ecx;
 	const struct x86_cpu_id *id;
@@ -558,7 +558,7 @@ static void intel_idle_cpuidle_devices_uninit(void)
  * intel_idle_cpuidle_driver_init()
  * allocate, initialize cpuidle_states
  */
-static int intel_idle_cpuidle_driver_init(void)
+static int __init intel_idle_cpuidle_driver_init(void)
 {
 	int cstate;
 	struct cpuidle_driver *drv = &intel_idle_driver;
Signature · 1 line
1.8.2.3
Reviewed-by on v1 3/3
#1 lore raw
Quoted 7 lines · Bartlomiej Zolnierkiewicz

intel_idle_probe() and intel_idle_cpuidle_driver_init() can be marked with __init tag as they are only called from intel_idle_init().

---

Quoted 25 lines
 drivers/idle/intel_idle.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/idle/intel_idle.c +2 -2
index 53b24f1..33e599e 100644
@@ -490,7 +490,7 @@ MODULE_DEVICE_TABLE(x86cpu, intel_idle_ids);
 /*
  * intel_idle_probe()
  */
-static int intel_idle_probe(void)
+static int __init intel_idle_probe(void)
 {
 	unsigned int eax, ebx, ecx;
 	const struct x86_cpu_id *id;
@@ -558,7 +558,7 @@ static void intel_idle_cpuidle_devices_uninit(void)
  * intel_idle_cpuidle_driver_init()
  * allocate, initialize cpuidle_states
  */
-static int intel_idle_cpuidle_driver_init(void)
+static int __init intel_idle_cpuidle_driver_init(void)
 {
 	int cstate;
 	struct cpuidle_driver *drv = &intel_idle_driver;
Signature · 5 lines
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog