usb: gps: Fix multiple gps setup issue

The problem this fix solves happens when calling
gps_port_setup more than once. This can happen during
dynamic composition switch. In this case the wrong
port number would be assigned to port_num, which would
result in a connection error.

Change-Id: Ibdfc84c41039cb021e705e98d4cba690452c0cf8
Signed-off-by: Bar Weiner <bweiner@codeaurora.org>
platform: msm: Clear BAM pipe pointer after USB disconnect

When the USB port is disocnnected from the host, all the BAM pipes are
closed and pipe data structure is freed. However, the pointer to this
structure has remained with a stale value. This has led to crashes after
re-connection since this pointer has been referenced again. Setting the
pointer value to NULL resolves this since there are NULL value checks
before this pointer is accessed.

Change-Id: I71db45d795f813b1f65af37756b9fe570b9b93d0
CRs-fixed: 576789
Signed-off-by: Danny Segal <dsegal@codeaurora.org>
USB: gadget: Fix IPA disconnect on suspend change

The IPA disconnect on suspend change has introduced a new is_connected flag
for tracking the BAM port state. However, this flag is not updated on the
connect and disconnect work functions. With this fix it is set to true in
the end of the connect work function and to false in the end of the
disconnect work functions.

Change-Id: Ibe22929b06038bee8c3b29e01cc5b25008758935
CRs-fixed: 571703
Signed-off-by: Danny Segal <dsegal@codeaurora.org>
Merge "usb: gps: Fix multiple gps setup issue"
Merge "platform: msm: Clear BAM pipe pointer after USB disconnect"
Merge "USB: gadget: Fix IPA disconnect on suspend change"