usb: gadget: cdev: Add spinlock to synchronize ports->cbits_updated
Consider a scenario in which open, write and close of AT port is being
done repeatedly. At some point in time, cbits_updated in f_cdev
structure gets overwritten by the previous close instance causing the AT
port to go unresponsive. This prevents port bridge service from sending
DTR/RTS settings to at_mdm0 from at_usb0.
Fix this by adding spinlock to synchronise the updation of
ports->cbits_updated field in f_cdev structure.
Change-Id: Ibf39aa90f3918cd5f22e32a3b06685db4c4298ae
Signed-off-by:
Pratham Pratap <quic_ppratap@quicinc.com>
Loading