auto_hotplug: cut down on expensive hotplugs

- My d2tmo device is generally more sensitive to temp changes than my d2att.
While using it for things like reading, auto_hotplug just isn't all
that dynamic and the expensive hotplugs were reflecting in
temperature/battery. Therefore, make it more difficult to hotplug and unplug.
This way, not only will it interfere less with users whose roms still contain
things like mpdecision, but it should also drastically reduce the unnecessary
amount of needless plugging.
Signed-off-by: Luis Cruz <ljc2491@gmail.com>
Fix memory leak in cpufreq stats.

commit e37736777254ce1abc85493a5cacbefe5983b896 upstream.

When system enters sleep, non-boot CPUs will be disabled.
Cpufreq stats sysfs is created when the CPU is up, but it is not
freed when the CPU is going down. This will cause memory leak.

Signed-off-by: xiaobing tu <xiaobing.tu@intel.com>
Signed-off-by: guifang tang <guifang.tang@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: Colin Cross <ccross@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>