alucard_hotplug: disabled hotplug sampling time calculation syncing with jiffies....
REVERT: Custom Faux Cpufreq table for all cores. before updating!

reverting:
https://github.com/dorimanx/Dorimanx-LG-G2-D802-Kernel/commit/58ff858f1a612affb39b6d58930aae69e7ff0e79
https://github.com/dorimanx/Dorimanx-LG-G2-D802-Kernel/commit/d1b63ccab6b35cc6104e72c6a1139f0b84e7d87b
https://github.com/dorimanx/Dorimanx-LG-G2-D802-Kernel/commit/2217ba587948e8aba989c15604e92a97ea4d8a2b
cpufreq / stats: fix race between stats allocation and first usage

This patch forces complete struct cpufreq_stats allocation for all cpus before
registering CPUFREQ_TRANSITION_NOTIFIER notifier, otherwise in some conditions
cpufreq_stat_notifier_trans() can be called in the middle of stats allocation,
in this case cpufreq_stats_table already exists, but stat->freq_table is NULL.

Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
cpufreq / stats: Get rid of CPUFREQ_STATDEVICE_ATTR

Macro "CPUFREQ_STATDEVICE_ATTR" is defined local to cpufreq_stats.c file and is
almost a copy of the generic version present in cpufreq.h file. Lets use the
generic version instead.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
cpufreq_stats: do not remove sysfs files if frequency table is not present

The sysfs files for cpufreq_stats are created in cpufreq_stats_create_table()
called from cpufreq_stat_notifier_policy() when a policy is added to
the cpu. cpufreq_stats_create_table() will not be called if the
scaling driver does not export a frequency table to cpufreq.  Use the
same fence on tear down.

Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
cpufreq: Preserve sysfs files across suspend/resume

The file permissions of cpufreq per-cpu sysfs files are not preserved
across suspend/resume because we internally go through the CPU
Hotplug path which reinitializes the file permissions on CPU online.

But the user is not supposed to know that we are using CPU hotplug
internally within suspend/resume (IOW, the kernel should not silently
wreck the user-set file permissions across a suspend cycle).
Therefore, we need to preserve the file permissions as they are
across suspend/resume.

The simplest way to achieve that is to just not touch the sysfs files
at all - ie., just ignore the CPU hotplug notifications in the
suspend/resume path (_FROZEN) in the cpufreq hotplug callback.

Reported-by: Robert Jarzmik <robert.jarzmik@intel.com>
Reported-by: Durgadoss R <durgadoss.r@intel.com>
Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
CPUFREQ STATS: Merged some checks from 3.10.y kernel.
CPUFREQ STATS: once again remove commit https://github.com/dorimanx/Dorimanx-LG-G2-D802-Kernel/commit/40cf2f818f45784bab7f81406291b5c28469f8f0 it's not working.

and commit https://github.com/dorimanx/Dorimanx-LG-G2-D802-Kernel/commit/3c9e49908b882631f3737022e707ffddf0b7c230

Interface just show empty table. i dont really need that.
Config. cleanup after driver remove.
alucard_hotplug: added mutex for protecting suspeded variable.