Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 360901
b: refs/heads/master
c: 907cc90
h: refs/heads/master
i:
  360899: 8008dad
v: v3
  • Loading branch information
Dirk Brandewie authored and Rafael J. Wysocki committed Mar 6, 2013
1 parent 2c5ccc1 commit 2d0ea49
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 29 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 37530f2bda039774bd65aea14cc1d1dd26a82b9e
refs/heads/master: 907cc908108b16ae87b7165be992511c968159f0
39 changes: 11 additions & 28 deletions trunk/drivers/cpufreq/intel_pstate.c
Original file line number Diff line number Diff line change
Expand Up @@ -747,37 +747,11 @@ static struct cpufreq_driver intel_pstate_driver = {
.owner = THIS_MODULE,
};

static void intel_pstate_exit(void)
{
int cpu;

sysfs_remove_group(intel_pstate_kobject,
&intel_pstate_attr_group);
debugfs_remove_recursive(debugfs_parent);

cpufreq_unregister_driver(&intel_pstate_driver);

if (!all_cpu_data)
return;

get_online_cpus();
for_each_online_cpu(cpu) {
if (all_cpu_data[cpu]) {
del_timer_sync(&all_cpu_data[cpu]->timer);
kfree(all_cpu_data[cpu]);
}
}

put_online_cpus();
vfree(all_cpu_data);
}
module_exit(intel_pstate_exit);

static int __initdata no_load;

static int __init intel_pstate_init(void)
{
int rc = 0;
int cpu, rc = 0;
const struct x86_cpu_id *id;

if (no_load)
Expand All @@ -802,7 +776,16 @@ static int __init intel_pstate_init(void)
intel_pstate_sysfs_expose_params();
return rc;
out:
intel_pstate_exit();
get_online_cpus();
for_each_online_cpu(cpu) {
if (all_cpu_data[cpu]) {
del_timer_sync(&all_cpu_data[cpu]->timer);
kfree(all_cpu_data[cpu]);
}
}

put_online_cpus();
vfree(all_cpu_data);
return -ENODEV;
}
device_initcall(intel_pstate_init);
Expand Down

0 comments on commit 2d0ea49

Please sign in to comment.