diff options
author | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2022-12-29 16:50:23 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-01-19 15:08:25 +0100 |
commit | fe6a00e8fcbecc8af36f8ba3b7bd5c8d28b10f05 (patch) | |
tree | 3452d8b492b581c53d7488cb2bbffed96ecfc552 /drivers | |
parent | 2f853f83f4bae34887723c7b32db8277bd489ca2 (diff) | |
download | linux-stable-fe6a00e8fcbecc8af36f8ba3b7bd5c8d28b10f05.tar.gz linux-stable-fe6a00e8fcbecc8af36f8ba3b7bd5c8d28b10f05.tar.bz2 linux-stable-fe6a00e8fcbecc8af36f8ba3b7bd5c8d28b10f05.zip |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/tty/serial/qcom_geni_serial.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c index f4e2486b2115..92aefd4f8527 100644 --- a/drivers/tty/serial/qcom_geni_serial.c +++ b/drivers/tty/serial/qcom_geni_serial.c @@ -827,20 +827,18 @@ static irqreturn_t qcom_geni_serial_isr(int isr, void *dev) if (m_irq_status & m_irq_en & (M_TX_FIFO_WATERMARK_EN | M_CMD_DONE_EN)) qcom_geni_serial_handle_tx(uport, m_irq_status & M_CMD_DONE_EN, - geni_status & M_GENI_CMD_ACTIVE); + 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: |