serial: samsung: wait for transfer completion before clock disable
authorRobert Baldyga <r.baldyga@samsung.com>
Mon, 24 Nov 2014 06:56:21 +0000 (07:56 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Fri, 20 Feb 2015 00:49:25 +0000 (00:49 +0000)
commit375c2b688c392e597d0a065451adeee9ba1bf7e4
treeb9d1c6e5d18904f6f4ca24ac7bba353b91cd3961
parent7010f0f36b3b2e6ae6a584060449a3100feee71e
serial: samsung: wait for transfer completion before clock disable

commit 1ff383a4c3eda8893ec61b02831826e1b1f46b41 upstream.

This patch adds waiting until transmit buffer and shifter will be empty
before clock disabling.

Without this fix it's possible to have clock disabled while data was
not transmited yet, which causes unproper state of TX line and problems
in following data transfers.

Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/tty/serial/samsung.c