tty: serial: qcom-geni-serial: refactor qcom_geni_serial_isr()
Simplify the conditions in qcom_geni_serial_isr() and fix indentation. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Link: https://lore.kernel.org/r/20221229155030.418800-8-brgl@bgdev.pl Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
2f853f83f4
commit
fe6a00e8fc
|
@ -829,18 +829,16 @@ static irqreturn_t qcom_geni_serial_isr(int isr, void *dev)
|
|||
qcom_geni_serial_handle_tx(uport, m_irq_status & M_CMD_DONE_EN,
|
||||
geni_status & M_GENI_CMD_ACTIVE);
|
||||
|
||||
if (s_irq_status & S_GP_IRQ_0_EN || s_irq_status & S_GP_IRQ_1_EN) {
|
||||
if (s_irq_status & (S_GP_IRQ_0_EN | S_GP_IRQ_1_EN)) {
|
||||
if (s_irq_status & S_GP_IRQ_0_EN)
|
||||
uport->icount.parity++;
|
||||
drop_rx = true;
|
||||
} else if (s_irq_status & S_GP_IRQ_2_EN ||
|
||||
s_irq_status & S_GP_IRQ_3_EN) {
|
||||
} else if (s_irq_status & (S_GP_IRQ_2_EN | S_GP_IRQ_3_EN)) {
|
||||
uport->icount.brk++;
|
||||
port->brk = true;
|
||||
}
|
||||
|
||||
if (s_irq_status & S_RX_FIFO_WATERMARK_EN ||
|
||||
s_irq_status & S_RX_FIFO_LAST_EN)
|
||||
if (s_irq_status & (S_RX_FIFO_WATERMARK_EN | S_RX_FIFO_LAST_EN))
|
||||
qcom_geni_serial_handle_rx(uport, drop_rx);
|
||||
|
||||
out_unlock:
|
||||
|
|
Loading…
Reference in New Issue