net: guard tcp_set_keepalive() to tcp sockets

Its possible to use RAW sockets to get a crash in
tcp_set_keepalive() / sk_reset_timer()

Fix is to make sure socket is a SOCK_STREAM one.

Change-Id: Ieeb498a3e623cfcb54e1c865a3c0229e4acf1e87
Reported-by: Dave Jones <davej@redhat.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
power: qpnp-bms: Improve logic for storing FCC learnt data

BMS module supports 16 (8-bit) battery backed-up registers.
Make sure that while backing-up the new data, always replace
the oldest stored data.

CRs-Fixed: 730047
Change-Id: I5fc406ec24ce242b722926cc1096f7dcaf561656
Signed-off-by: Zhenhua Huang <zhenhuah@codeaurora.org>
MSM_THERMAL: After lost of work, here is NEW Intelligent Thermal!
I have merged only the good stuff from latest thermal subsystem
faux123/Nexus_5@f9295cd

and from Intelligent Thermal V2 by @faux123
faux123/Nexus_5@8a12801

*Msm: thermal: Clean up msm cpufreq function calls
*Added new struct for Intelli INIT dunamic values.
*Merged new way to init and change min/max freq on termal limits.
*Merged msm_thermal_dev_exit
*Cleaned all 80 char lines.
*Merged info strings for dmesg
*Changed core_control sysfs name from enable to core_control_enable
This prevent ROM thermal code to mess with this control! see also userspace mods.
dorimanx/LG-G2-D802-Ramdisk@a3e156b
*Init Intelli Thermal as ON on boot.
*For LG, added fix for stuck min freq at high freq... usually 1.4Ghz so it's will be low min
if above 960Mhz as MIN FREQ.
*DEFAULT_POLLING_MS to 500
*Added comments to find all needed other functions in arch/arm/mach-msm/cpufreq.c
and include/linux/cpufreq.h

I have tested this driver for hours, and it's performing perfect!

Conflicts:
	drivers/thermal/msm_thermal.c
qcom: rpm-smd: Mask the interrupt before sending the sleep set.

Sending a sleep set would cause an SMD interrupt to fire. If the
interrupt was previously affine to a different CPU, it could cause a
premature wakeup of that CPU. Prevent this by masking the interrupt
before sending the sleep set.

Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
defconfig: update, disable RPM stats, re-enable other stuff

Conflicts:
	arch/arm/configs/cm_m8_defconfig
thermal: add headers from dorimanx to support his newest thermal driver
thermal: ioctl interface is not necessary
thermal/cpufreq: add back msm_cpufreq_get_index function