serial: samsung: wait for transfer completion before clock disable
commit17f35338d3b877b7434281e615e1926e560b97dc
authorRobert Baldyga <r.baldyga@samsung.com>
Mon, 24 Nov 2014 06:56:21 +0000 (24 07:56 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 24 May 2015 08:10:39 +0000 (24 10:10 +0200)
treee683029728152ae1fca2dcedfd1f9a93f0b71889
parentd75221306dc828395739fee7efae402a5cc45df3
serial: samsung: wait for transfer completion before clock disable

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.

Cc: stable@vger.kernel.org
Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 1ff383a4c3eda8893ec61b02831826e1b1f46b41)
Signed-off-by: Willy Tarreau <w@1wt.eu>
drivers/serial/samsung.c