cpufreq: intel_pstate: Make intel_pstate_kobject and debugfs_parent locals
authorStratos Karafotis <stratosk@semaphore.gr>
Fri, 18 Jul 2014 15:37:17 +0000 (08:37 -0700)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 21 Jul 2014 11:43:17 +0000 (13:43 +0200)
Since we never remove sysfs entry and debugfs files, we can make
the intel_pstate_kobject and debugfs_parent locals.

Also, annotate with __init intel_pstate_sysfs_expose_params()
and intel_pstate_debug_expose_params() in order to be freed
after bootstrap.

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/intel_pstate.c

index 86631cb6f7dee9316774517f6b9d75243bda103b..601c428cab9410f5dfe3628fd9983c8097fa263a 100644 (file)
@@ -253,9 +253,9 @@ static struct pid_param pid_files[] = {
        {NULL, NULL}
 };
 
-static struct dentry *debugfs_parent;
-static void intel_pstate_debug_expose_params(void)
+static void __init intel_pstate_debug_expose_params(void)
 {
+       struct dentry *debugfs_parent;
        int i = 0;
 
        debugfs_parent = debugfs_create_dir("pstate_snb", NULL);
@@ -342,10 +342,10 @@ static struct attribute *intel_pstate_attributes[] = {
 static struct attribute_group intel_pstate_attr_group = {
        .attrs = intel_pstate_attributes,
 };
-static struct kobject *intel_pstate_kobject;
 
-static void intel_pstate_sysfs_expose_params(void)
+static void __init intel_pstate_sysfs_expose_params(void)
 {
+       struct kobject *intel_pstate_kobject;
        int rc;
 
        intel_pstate_kobject = kobject_create_and_add("intel_pstate",
This page took 0.026473 seconds and 5 git commands to generate.