msm: usbaudio: Add support for USB headset detection

 - During bootup, create a file system storing the
   information about usb device state and name, and
   broadcast the message to userspace whenever the
   device is plugged or unplugged.

 - Register the device at USB sound card initialization
   for creating file system and toggle the state in that
   filesystem when USB is plugged/unplugged. This will
   also send a message to user space informing it about
   state change.

Change-Id: Icd78273bb765a26bbc70725afebe8955de8f7315
Signed-off-by: Harmandeep Singh <hsingh@codeaurora.org>
msm: usbaudio: Fix memory allocation for USB audio module init

Fix memory allocation issue in snd_usb_audio_init()
use sizeof(struct) insead of sizeof(pointer)

Change-Id: I270bbd7111e97dd4e0e92378f61d5025e16f5fca
Signed-off-by: Alex Fradkin <afradkin@codeaurora.org>
ASoC: usb: move the switch setting to more appropriate location

There is a delay between creation of sound card and creating of
corresponding steam. Currently we set the switch at the time of
creation of card. And later streams get created, so its more
optimal if we set the switch only after creating the stream.

Change-Id: Ic9f29d7a8dbcd32cde0097289ce6e1404a837372
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
USB: core: Fix misc OTG related bugs

This patch fixes the following OTG related bugs:

1. The current code does not wait for the ongoing HNP polling work to
finish upon the device disconnection which results in a crash when
accessing the udev structure in hnp polling routine.

2. bcdOTG field is added to OTG descriptor in 2.0 revision. Check OTG
descriptor size before validating bcdOTG field.  A legacy device sends
2 bytes lesser than the size of OTG descriptor specified in 2.0 spec.

3. The host is required to execute a GetStatus() with a frequency of
THOST_REQ_POLL in order to determine the state of the Host request flag.
The limits of THOST_REQ_POLL are 1 - 2 sec. Use the average value 1.5 sec
for HNP polling to pass compliance tests.

Change-Id: Ie6a6a8e915d10c1347946f979c919d04d64823b4
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
USB: dynamically allocate usb_device children pointers instead of using a fix array

Non-hub device has no child, and even a real USB hub has ports far
less than USB_MAXCHILDREN, so there is no need using a fix array for
child devices, just allocate it dynamically according real port
number.

Signed-off-by: Huajun Li <huajun.li.lee@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
add exhilarate/i577 att defconfig

Change-Id: I54c4cb0abab2b3ae9d6878b0a318fce08ec8a853
[MMC] Patch the firmware of certain Samsung emmc parts to fix a bug

Patch the firmware in certain Samsung emmc chips after every power-on
to workaround a bug in the wear leveling code.  Patch provided by Samsung
Semiconductor, and the code to apply the patch was originally written
by Jeonghwan Min of Samsung.

Change-Id: Id40cfb8f68842fc4a47f60ae032f1b49c0fcb65e
Signed-off-by: Ken Sumrall <ksumrall@android.com>
Add PR_{GET,SET}_NO_NEW_PRIVS to prevent execve from granting privs

With this set, a lot of dangerous operations (chroot, unshare, etc)
become a lot less dangerous because there is no possibility of
subverting privileged binaries.

Includes additional work to fix apparmor.

Patch taken from kernel.org, authored by
Andy Lutomirski <luto@amacapital.net>
John Johansen <john.johansen@canonical.com>

Change-Id: Ic34200e2d1a690a81c0e88a59926f81c805ee713
Cleanup cifssmb.c

The purpose of this commit is to fix spacing and 
clean up code so that it mirrors the cifssmb.c 
made from the commit "cifs: silence compiler 
warnings showing up with gcc-4.7.0" by 
Jeff Layton <jlayton@redhat.com> which is now 
part of kernel version 3.0.91 located at
Change-ID a9d8aaedf15cc981df0aebda88b113eeee9c5cab  

Change-Id: I51b518582d860345fa345a3b27aa646c9577383f
Merge remote-tracking branch 'upstream/cm-10.2' into cm-10.2