diff options
author | Stratos Karafotis <stratosk@semaphore.gr> | 2014-07-18 11:37:17 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-07-21 07:43:17 -0400 |
commit | 317dd50e80775434a2ea593ad8522e728ed94e9d (patch) | |
tree | 05bce3107986a53f1c45d1f5f6f8385449744ee6 | |
parent | 9a3c4145af32125c5ee39c0272662b47307a8323 (diff) |
cpufreq: intel_pstate: Make intel_pstate_kobject and debugfs_parent locals
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>
-rw-r--r-- | drivers/cpufreq/intel_pstate.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index 86631cb6f7de..601c428cab94 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c | |||
@@ -253,9 +253,9 @@ static struct pid_param pid_files[] = { | |||
253 | {NULL, NULL} | 253 | {NULL, NULL} |
254 | }; | 254 | }; |
255 | 255 | ||
256 | static struct dentry *debugfs_parent; | 256 | static void __init intel_pstate_debug_expose_params(void) |
257 | static void intel_pstate_debug_expose_params(void) | ||
258 | { | 257 | { |
258 | struct dentry *debugfs_parent; | ||
259 | int i = 0; | 259 | int i = 0; |
260 | 260 | ||
261 | debugfs_parent = debugfs_create_dir("pstate_snb", NULL); | 261 | debugfs_parent = debugfs_create_dir("pstate_snb", NULL); |
@@ -342,10 +342,10 @@ static struct attribute *intel_pstate_attributes[] = { | |||
342 | static struct attribute_group intel_pstate_attr_group = { | 342 | static struct attribute_group intel_pstate_attr_group = { |
343 | .attrs = intel_pstate_attributes, | 343 | .attrs = intel_pstate_attributes, |
344 | }; | 344 | }; |
345 | static struct kobject *intel_pstate_kobject; | ||
346 | 345 | ||
347 | static void intel_pstate_sysfs_expose_params(void) | 346 | static void __init intel_pstate_sysfs_expose_params(void) |
348 | { | 347 | { |
348 | struct kobject *intel_pstate_kobject; | ||
349 | int rc; | 349 | int rc; |
350 | 350 | ||
351 | intel_pstate_kobject = kobject_create_and_add("intel_pstate", | 351 | intel_pstate_kobject = kobject_create_and_add("intel_pstate", |