cpufreq: interactive: handle errors from cpufreq_frequency_table_target

Add checks for error return from cpufreq_frequency_table_target, and be
less noisy on the existing call with an error check.  CPU hotplug and
system shutdown may cause this call to return -EINVAL.

Bug: 8613560
Change-Id: Id78d8829920462c0db1c7e14e717d91740d6cb44
Signed-off-by: Todd Poynor <toddpoynor@google.com>
cpufreq: interactive: reduce chance of zero time delta on load eval

Reschedule load sampling timer after timestamp of sample start taken,
hold spinlock across entire sequence to avoid preemption.  Avoid the
WARN for zero time delta in the load sampling timer function.

Change-Id: Idc10a756f09141decb6df92669521a1ebf0dbc10
Signed-off-by: Todd Poynor <toddpoynor@google.com>
cpufreq: interactive: avoid underflow on active time calculation

Check for idle time delta less than elapsed time delta, avoid
underflow computing active time.

Change-Id: I3e4c6ef1ad794eec49ed379c0c50fa727fd6ad28
Signed-off-by: Minsung Kim <ms925.kim@samsung.com>
Merge remote-tracking branch 'common/android-3.0' into HEAD

Change-Id: I672570efc565e3fab9230cdd7dfe25650a18dee8
char: import frandom

Change-Id: I3ee8a5bac9643752c7f59bbc14d6e8ccf36ca779
glacier: rework memory sizes

Change-Id: Ia4255d348a21d89397eae9bac19ea517fb6bb011
Revert "Add frandom, thanks Zarboz"

This reverts commit 0e04abdb1108717c34fe74db4cc72bc7a0599b4a.
Merge remote-tracking branch 'upstream/jellybean' into jellybean