ashmem: avoid deadlock between read and mmap calls

Avoid holding ashmem_mutex across code that can page fault.  Page faults
grab the mmap_sem for the process, which are also held by mmap calls
prior to calling ashmem_mmap, which locks ashmem_mutex.  The reversed
order of locking between the two can deadlock.

The calls that can page fault are read() and the ASHMEM_SET_NAME and
ASHMEM_GET_NAME ioctls.  Move the code that accesses userspace pages
outside the ashmem_mutex.

Bug: 9261835
Change-Id: If1322e981d29c889a56cdc9dfcbc6df2729a45e9
Signed-off-by: Todd Poynor <toddpoynor@google.com>
cable_detect: fix build when CABLE_DETECT_GPIO_DOCK is disabled

Change-Id: I0695a6e8f27c113889621552778cb986fd05313e
drivers: usb: add missing params for msm_otg
 - also fix declarations after ifdef

Change-Id: Iba843c555462791b37011901db01c51533148ac6
qdsp5v2: ported 1x audio driver from gb

Change-Id: I41b2cdf0a567aaa6e65a2c9f7fa91cb2ea78ec72
Glacier: enable the 1x audio variant

Change-Id: I1d0c8465a478c88d4cc874ede2e81c2b210a0e85
Merge remote-tracking branch 'common/android-3.0' into HEAD
glacier: use .hpin_gpio instead of .hpin_irq for headset_pmic

This reverts commit 1d159ea2dbb430d2fd31dc83c0b10d3fafdfb7ba

Change-Id: I1ef3e2364c7b118e1d4aa6c1ad9be5f3fb4ed058
Revert "Glacier: enable the 1x audio variant"

This reverts commit 9d8278eecbdbed6ef6f96845c8b84fa78877eec2.
Merge remote-tracking branch 'upstream/jellybean' into jellybean