blu_plug: Dynamic hotplug driver for hammerhead
Squashed, based on dyn_hotplug by stratosk
Improvements, fixes, changes and ported to hammerhead by eng.stk <eng.stk@sapo.pt>

Conflicts:
	arch/arm/mach-msm/Kconfig
	arch/arm/mach-msm/Makefile
defconfig: enable blu_plug
cpufreq: create a helper function to get CPU utilization. Picked from @stratosk

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
blu_plug: improvements and fixes
* Driver recode and rework
* Improve suspend/resume routines
* Improve load calculations and plu/unplug routines
* Better work and queue management
* Fix merge derps and unplug if down_timer_cnt is set lower than up_timer_cnt thanks @kagwind
* Use original stratosk load calculation, link to cpu governor
* Add debug stuff
* Add min_cpu_offscreen tunable
* Other  misc. that I forgot ;p

Conflicts:
	drivers/cpufreq/cpufreq_interactive.c
blu_plug: Tune initial values, down_timer_cnt can't be lower than up__timer_cnt, missing bits, small fixes
[PATCH] netlink: add signed types

Signed types might be needed in NL communication from time to time
(I need s32 in team driver), so add them.

Change-Id: Icc6c8286a1d55313fcc7993d8b02267fe1ef2bdc
CRs-Fixed: 677858
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
zlib: clean up some dead code

Cleanup unused `if 0'-ed functions, which have been dead since 2006
(commits 87c2ce3b9305 ("lib/zlib*: cleanups") by Adrian Bunk and
4f3865fb57a0 ("zlib_inflate: Upgrade library code to a recent version")
by Richard Purdie):

 - zlib_deflateSetDictionary
 - zlib_deflateParams
 - zlib_deflateCopy
 - zlib_inflateSync
 - zlib_syncsearch
 - zlib_inflateSetDictionary
 - zlib_inflatePrime

Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
blu_plug: Set up_threshold to 70, let's try without  jiffies
blu_active: Since we got blu_plug, let's rename and keep it linear

Conflicts:
	arch/arm/configs/code_blue_hammerhead_defconfig
	drivers/cpufreq/Kconfig
	drivers/cpufreq/Makefile
	include/linux/cpufreq.h
blu_plug: add max_freq_screenoff, reworked suspend/resume, misc fixes
blu_plug: add powersaver mode, misc fixes
* When in powersaving, device has 1 core online @ 1728 MHz
blu_plug: fix powersaver_mode when screenoff to save more juice
makefile: use arm-cortex_a15-linux-gnueabihf-linaro_4.9.2-2014.08 toolchain by default
blu_plug: driver is always enabled
wcnss: add null check in pm_ops unregister. From https://github.com/myfluxi/android_kernel_lge_hammerhead/commit/5258a3d36a09caf77fabe4b46d14cb0bc7e03c49

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
cpufreq / core: Fix typo in comment describing show_bios_limit()

show_bios_limit is mistakenly written as show_scaling_driver in a comment
describing purpose of show_bios_limit() routine.

Fix it.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
cpufreq: return early from __cpufreq_driver_getavg()

There is no need to do cpufreq_get_cpu() and cpufreq_put_cpu() for drivers that
don't support getavg() routine.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
cpufreq: Fix sparse warning by making local function static

cpufreq_disabled() is a local function, so should be marked static.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
cpufreq: Remove unnecessary initialization of a local variable

Remove an unnecessary initializer for the 'ret' variable in
__cpufreq_set_policy().

[rjw: Modified the subject and changelog slightly.]
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Bluetooth: fix possible info leak in bt_sock_recvmsg()

In case the socket is already shutting down, bt_sock_recvmsg() returns
with 0 without updating msg_namelen leading to net/socket.c leaking the
local, uninitialized sockaddr_storage variable to userland -- 128 bytes
of kernel stack memory.

Fix this by moving the msg_namelen assignment in front of the shutdown
test.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Cc: Marcel Holtmann <marcel@holtmann.org>
Cc: Gustavo Padovan <gustavo@padovan.org>
Cc: Johan Hedberg <johan.hedberg@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>