cpufreq: Prevent memory leak in cpufreq_stats on hotplug
authorColin Cross <ccross@android.com>
Sat, 29 Jan 2011 03:32:31 +0000 (19:32 -0800)
committerColin Cross <ccross@android.com>
Sun, 30 Jan 2011 07:51:46 +0000 (23:51 -0800)
commitfa51e1a77ebb12ca61510370e78e679a314e3dda
treee01d65b6248efc1d0e03c8c08e70213ef5b1156a
parent6f0193721acf50368b585e3fad8c206049e2e07a
cpufreq: Prevent memory leak in cpufreq_stats on hotplug

Ensures that cpufreq_stats_free_table is called before
__cpufreq_remove_dev on cpu hotplug (which also occurs during
suspend on SMP systems) to make sure that sysfs_remove_group
can get called before the cpufreq kobj is freed.  Otherwise,
the sysfs file structures are leaked.

Change-Id: I87e55277272f5cfad47e9e7c92630e990bb90069
Signed-off-by: Colin Cross <ccross@android.com>
drivers/cpufreq/cpufreq_stats.c