diag: Bring diag up to date

Diag on the A-Family mainline has fallen out of date. Create a
commit to bring diag up to date.

This includes the HSIC race condition fix while in MEMORY_DEVICE_MODE

CRs-Fixed: 446711

Change-Id: Iceb2afb0bf6e52db45732b51b51777030df312ac
Signed-off-by: Dixon Peterson <dixonp@codeaurora.org>

Conflicts:
	drivers/char/diag/diag_dci.c
	drivers/char/diag/diag_dci.h
	drivers/char/diag/diag_masks.c
	drivers/char/diag/diagfwd.c
power: pm8921-charger: add boundary check for out of bounds issues

Add boundary check to avoid any possible array index out of bounds

Change-Id: Ifad79991298e9d779b38a33a270af5197d2fc060
Signed-off-by: Willie Ruan <wruan@codeaurora.org>
power: pm8921-charger: Do not update "type" property of usb_psy

The userspace fails to detect the supply type as USB if "type"
property of usb_psy power-supply class is set to anything other
than USB at init. The driver ends up setting this to type
-UNKNOWN at bootup if there is no USB source present
-USB_DCP/ACA if a wall charger is present
This causes issues with displaying the charger source later on
since the USB path is not noted by the userspace. Moreover, the
userspace ignores the changes to the type property at runtime
making it futile for the driver to update it.

Use local driver data to store the usb type information
and use this to determine the supply-type. Keep the
usb_psy.type set to USB always.

CRs-Fixed: 451196
Change-Id: I69d6935826a05dd0310b960b4fd1735bc77ec67f
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
media: mpq: Secure demux version verification

Secure demux major version denotes the API version.
This patch verifies that the reported major version is compatible,
and outputs a warning if not.

Change-Id: I7dc0fd86a761f2300c4b2d62b6dbc56f12dc721a
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
tspp: improve tspp_open_stream/tspp_close_stream behavior

The TSPP driver's kernel API supports opening and closing a TSPP stream
using the tspp_open_stream/tspp_close_stream API functions. This commit
fixes a few minor issues with the behavior and usage of this API.

tspp_open_stream and tspp_close_stream were fixed to connect/disconnect
the appropriate TSIF source based on the TSIF reference count.

The call to tspp_close_stream from within tspp_close_channel was removed,
since a kernel driver that uses the TSPP driver API is expected to call
tspp_close_stream explicitly, and not rely on the TSPP driver to close
the stream implicitly when the channel is closed.

An ioctl was added to allow user-space application to close the stream.

Change-Id: If49b440d9d83c8bba54aeabc18e8f06b3cc11b3e
Signed-off-by: Liron Kuch <lkuch@codeaurora.org>

Conflicts:
	drivers/media/dvb/mpq/demux/mpq_dmx_plugin_tspp_v1.c
gpu: ion: suppress excessive logging for expected failure cases

We expect alloc_pages to fail for high-order pages under stressed
memory conditions. It should then fall back to lower-order page
allocations but due to excessive logging the system crashes. Use
__GFP_NOWARN for high-order allocations to avoid excessive logging.

(cherry picked from commit ff6ea62fe0687e754ddb64492e77fd75ad85fa02)

CRs-Fixed: 454877
Change-Id: Ie18c2dddd6810038abad9b06c7838ff4a0844b6d
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>