msm: audio: qdsp6v3: Add size safety check to ACDB driver

Check that the size sent by userspace is not larger
then the internal amount allowed. This protects
against overflowing the stack due to an invalid size.
power: fbearlysuspend: add sleep hack for CRT-off animation

HTC panels don't seem to work correctly with the Android
CRT-off animation. Add a short sleep period to let userspace
finish drawing the animation.

credit: kushdeck<kushdeck@gmail.com>
vigor: update defconfig

Change-Id: Ifed0abe14f55d374a38dc745fe125961f6aedcb7
msm: smd_pkt: Handle wakelocks appropriately to optimize power usage

If the user-space application performs a poll() operation before a
read() operation, then release the wakelock in the read operation.
This is under the assumption that user-space application can grab a
wakelock between poll() and read() operations. If the user-space
application does not perform poll() operation at all before read()
operation, then allow the wakelock to timeout and release itself.

CRs-Fixed: 337654
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
(cherry picked from commit 048ef381aca6b150953a4e6d9b196778589f8e71)

Change-Id: I3cb6e1b06dbb08522dd66dcd8f5cfe4069fefdb1
Signed-off-by: Ram Kumar Chakravarthy Chebathini <rcheba@codeaurora.org>

msm: smd_pkt: Add packet arrival wakelock

While handling the incoming packets from remote subsystems, delay the
system suspension by holding a wakelock with a timeout value of 2 seconds.
This will allow the user-space clients to process the incoming packets
before the system goes to suspend.

(cherry picked from commit c3c5cd93233bccaff0d0230932a5e387ce8dcd4a)

Change-Id: I488f795b76c8aad546a9b14b004d6a59be63b01c
CRs-Fixed: 335782
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
usb: gadget: android: Honor CONFIG_USB_GADGET_VBUS_DRAW

The maximum current draw was hard coded to 500 mA.  composite.c
has code that uses CONFIG_USB_GADGET_VBUS_DRAW to set the
bMaxPower and to set whether or not the device is self-powered if
they haven't been set.  This change removes the code in android.c
to allow composite.c to set them.

Change-Id: I9db37922e91ee86e9e5c0e14519e119e5c41ca48
Signed-off-by: Scott Anderson <saa@google.com>
usb: gadget: android: Fix product name

Product names may contain spaces and scanf %s only matches the 1st word.
Use strlcpy instead.

Change-Id: Ie8703fea9775f7fc17fe615a42597ca3816d36b0
Signed-off-by: Benoit Goby <benoit@android.com>
Revert "vigor: remap memory"

https://github.com/Flyhalf205/vigor_aosp_kernel/commit/a92df1466fa5fb7ef9b0e85e8fcd0c73c771f832

Change-Id: I51124a6d51360a9b2c2406e6e8df8a6dc5f9f42c
Revert "defconfig: enable SELinux"

This reverts commit https://github.com/Flyhalf205/vigor_aosp_kernel/commit/ae5f0ae6a012db229eecde72514dabe5d3fc36d8

Change-Id: Id275d73db56ef35c06a13708b2af737d4bac098b
Merge remote-tracking branch 'vigor/cm-10.2' into cm-10.2