mm, oom: make dump_tasks public

Allow other functions to dump the list of tasks.
Useful for when debugging memory leaks.

Change-Id: I76c33a118a9765b4c2276e8c76de36399c78dbf6
Signed-off-by: Liam Mark <lmark@codeaurora.org>
lowmemorykiller: enhance debug information

Add extra debug information to make it easier to both determine
why the lowmemorykiller killed a process and to help find the source
of memory leaks

Also increase the debug level for "select" statements to help prevent
flooding the log.

Conflicts:
	drivers/staging/android/lowmemorykiller.c

Change-Id: I3b6876c5ecdf192ecc271aed3f37579f66d47a08
Signed-off-by: Liam Mark <lmark@codeaurora.org>
Merge "mm, oom: make dump_tasks public"
Merge "lowmemorykiller: enhance debug information"
ASoC: msm-lsm-client: handle close gracefully

The listen pcm device could get closed abruptly due to userspace
application crash. In such cases, the device close will be invoked
abruptly. Handle this scenario gracefully by properly cleaning up the
driver before close.

Change-Id: Ie841f300400d547260da92383712a9aa0689d7a7
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
Merge "ASoC: msm-lsm-client: handle close gracefully"
asoc: wcd: acquire wakelock during cable detection

There could be race condition that suspend is called
even before the detection is completed which can
result in high power numbers. Make sure device doesn't
go to suspend until the detection logic is completed.

Change-Id: I38d049b020137562aa4b5cb7c335781b3d4ada16
Signed-off-by: Simmi Pateriya <simmip@codeaurora.org>
ASoC: wcd9xxx: Don't enable micbias if headset is removed

If special headset is removed, the callback to
disable micbias will be called, as micbias is
always on with special headset. Mbhc driver
checks a flag, used to disable/enable micbias
for special headset, to make sure micbias is
not disabled by recording. If this flag is not
updated properly before the callback is called
while the headset is removed, it can cause that
micbias is left enabled.

CRs-Fixed: 687630
Change-Id: Id49a2a0ba43821deef8fc5b6fb904239b2273f69
Signed-off-by: Simmi Pateriya <simmip@codeaurora.org>
Merge "asoc: wcd: acquire wakelock during cable detection"
ASoC: msm: qdsp6v2: Add SEC_I2S_RX port as EC reference

SECONDARY_I2S_RX as EC reference port is needed for msm8x10.
Add support to enable SEC_I2S_RX as EC reference port.

Change-Id: Ie9b36a357f078e6582d4275f41b3314c4fb32992
Signed-off-by: Anish Kumar <kanish@codeaurora.org>
media: dvb: check filter is valid for fullness callback

In PULL mode, all relevant filters' buffer space is checked
to ensure sufficient space or otherwise blocking untill it
becomes available. As callback might sleep it is called without
holding any locks. So at this time, just before the callback executes,
the filter might have been closed by a different thread.
To prevent invalid access, verify in the callback that filter is still
valid.

Change-Id: Ie07ac5d17942ef39d12e4eed3078e382c956fe2e
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
media: dvb: check filter is valid for fullness callback

In PULL mode, all relevant filters' buffer space is checked
to ensure sufficient space or otherwise blocking untill it
becomes available. As callback might sleep it is called without
holding any locks. So at this time, just before the callback executes,
the filter might have been closed by a different thread.
To prevent invalid access, verify in the callback that filter is still
valid.

Change-Id: Ie07ac5d17942ef39d12e4eed3078e382c956fe2e
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
Merge "media: dvb: check filter is valid for fullness callback"
Merge "media: dvb: check filter is valid for fullness callback"
Update to AU_LINUX_ANDROID_LNX.LA.3.5.2.1.04.04.02.060.146

Change-Id: I5cad7634c353ae695c5e7b3489ba08d5516dec66
Signed-off-by: B2G User <b2guser@localhost>
Merge "Update to AU_LINUX_ANDROID_LNX.LA.3.5.2.1.04.04.02.060.146"
msm_rmnet: Fix potential memory corruption

Usage of legacy string manipulation function sprintf could lead to
memory corruption as the number of bytes to be written to the
destination is not bounded. Replace sprintf with snprintf where the
number of bytes to be written is explicitly specified.

CRs-fixed: 672202
Change-Id: I77f8d1abe2067bee1c68d7a60a35866fced54b8c
Signed-off-by: Michael Vines <mvines@codeaurora.org>
Merge "msm_rmnet: Fix potential memory corruption"
Merge "ASoC: msm: qdsp6v2: Add SEC_I2S_RX port as EC reference"
power: qpnp-bms: always limit soc to [0, 100]

Currently, soc is only limited to [0, 100] when adjust_soc runs.
However, there are some cases where the main algorithm of adjust_soc is
skipped, due to charging, SOC being too high or in the flat region of
the PC/OCV curve.

This can cause issues where SOC is calculated to be over 100 or under
0, which is undesirable. Fix this by moving the bound_soc call to the
main calculate_soc function so that it is never skipped.

CRs-Fixed: 697713
Change-Id: I641f513d182c62731a4fc115f29c0e38e5ec4c14
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>