serial: max310x: Fix tx_empty() callback
authorAlexander Shiyan <shc_work@mail.ru>
Wed, 19 Dec 2018 11:19:20 +0000 (14:19 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Dec 2019 14:37:37 +0000 (15:37 +0100)
commit077d87993053a743ddf29540ab9a75928e6cf27c
treed0805543f9f934512da4e2a76fb5ac58ce9a951a
parentc6418ce8b8526b03d04f79816eb412b9907425bc
serial: max310x: Fix tx_empty() callback

[ Upstream commit a8da3c7873ea57acb8f9cea58c0af477522965aa ]

Function max310x_tx_empty() accesses the IRQSTS register, which is
cleared by IC when reading, so if there is an interrupt status, we
will lose it. This patch implement the transmitter check only by
the current FIFO level.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/tty/serial/max310x.c