serial: sprd: add locking for tx 04/135304/1 accepted/tizen/unified/20170622.105111 submit/tizen/20170622.031845
authorJoonyoung Shim <jy0922.shim@samsung.com>
Wed, 21 Jun 2017 05:03:29 +0000 (14:03 +0900)
committerJoonyoung Shim <jy0922.shim@samsung.com>
Wed, 21 Jun 2017 05:03:29 +0000 (14:03 +0900)
commit204f97319f98efb9b091d3d47116c0c3ec8b9dc3
tree0415d25499bde1cb8985415bad25d6c9a494c854
parent018f43655ebd7af6a1caf1523c001346be2aa089
serial: sprd: add locking for tx

Sometimes booting time is delayed as waiting in tty for closing_wait
value when tty device is closed during do tx.

The tty driver requests to wakeup waiting process if pending tx data is
handled by tty driver, then above waiting should be stopped. BTW now
without stop, the waiting is kept until closing_wait value.

I'm not sure, but this problem seems be occured by processing about tx
data without any synchronization.

This patch adds locking for tx in sprd serial driver, then this problem
is gone.

Change-Id: Icb9d774c4d989c09b666be6951d01a820bb17be5
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
drivers/tty/serial/serial_sprd_dt.c