Revert "adbd: Don't close/reopen FFS ep0 on disconnect"

This reverts commit b5d385f1ef38ad0c163598c3a4e167d4ae9df3c6.

Commit b5d385f "adbd: Don't close/reopen FFS ep0 on disconnect"
fixes USBCV chapter 9 failures due to re-enumeration as part of
reopening FFS ep0 handle. This was done from usb_kick function
which gets invoked whenever adb read/write fails.
But, not allowing USB re-enumeration on real IO failures results
in adb to go offline and only way to recover is by re-connecting
USB cable.
As ADB function is used for debugging and USBCV tests are not
mandatory, hence, revert original change to allow USB
enumeration on any read/write failures.

CRs-fixed: 689512
Change-Id: Ic0b38223761b7c0eb3e2c54328e88010297318fb
Dedupe _GNU_SOURCE and ucontext.h definition and inclusion, put them in sane locations.

Change-Id: Ib61db11ec1a00ca675820da8dc916f7ce03e445e
audio: Unhide PCM offload enums

Change-Id: Iab074ae64d293781769032cc902e72a93374679f
Merge remote-tracking branch 'cm/cm-11.0' into kitkat
ueventd: Add bootdevice symlink

Create the /dev/block/bootdevice symlink to point to the
boot device information based on kernel command line.
This decouples references to the boot device from the
actual device nodes (e.g. eMMC, UFS).

Change-Id: If54b0b6ba6007742e9cb3d9d90cb3c86cd30b898
IMS-VT: Define IMS group.

Define IMS group.

CRs-Fixed: 615689

Conflicts:
	include/private/android_filesystem_config.h

Change-Id: Ie7fed3090a20db1e27a03d2d2cdde443d7ff5435
init: Allow platform devices directly under soc.0 *HACK*

Allow one level of platform device to be registered right
under the /sys/devices/soc.0 platform device.

Change-Id: I57c80c294a92f8b9ab91b3ee2f73bb156bb18945
init: Allow target-specific platform device base to be specified

Add optional build-time flag, TARGET_PLATFORM_DEVICE_BASE,
to specify the base sysfs path (without the /sys prefix)
where the platform device resides.  This provides support for
targets where platform devices are all under a master level
platform device (e.g. soc-bus).

Change-Id: I7b19b69f2c95335d6512e181f265b874e1713f64
System/core: Start qrng daemon upon power up

1. Set root permissions to qrng daemon upon powerup
2. Drop all permissions except few, just enough to make ioctl calls

Permission for hardware random device is changed in
this gerrit (part of Point 1(above))

Change-Id: Ibf58b7212ba1ec532de9d461266081f3ac4395e3
Signed-off-by: Hariprasad Dhalinarasimha <hnamgund@codeaurora.org>
init: Fix memory corruption when sanitizing platform paths

This commit fixes code that incorrectly increments s when it
hits the terminator character of the string being sanitized.
This means it will randomly start trashing memory beyond the
end of the string being sanitized until it happens to hit two
NULs (\0\0) which will break it out of the loop.

Change-Id: I76553d7f183236a78a0bc7b408e92559b98f732f
system: Update function to calculate bytes per sample for offload

Update function to calculate bytes per sample for offload format

Change-Id: I46b78024293be959ad5d1db1f583933d2ab14576
Merge remote-tracking branch 'cm/cm-11.0' into kitkat
Merge remote-tracking branch 'cm/cm-11.0' into kitkat
Merge remote-tracking branch 'aospa-legacy/kitkat' into kitkat-legacy

Conflicts:
	libcorkscrew/arch-x86/backtrace-x86.c