Commit 6db01688 authored by Heiner Kallweit's avatar Heiner Kallweit Committed by Mauro Carvalho Chehab

[media] media: rc: nuvoton: simplify nvt_get_rx_ir_data a little

Simplify the code a little.
Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent a2006ca4
...@@ -791,7 +791,7 @@ static void nvt_handle_rx_fifo_overrun(struct nvt_dev *nvt) ...@@ -791,7 +791,7 @@ static void nvt_handle_rx_fifo_overrun(struct nvt_dev *nvt)
/* copy data from hardware rx fifo into driver buffer */ /* copy data from hardware rx fifo into driver buffer */
static void nvt_get_rx_ir_data(struct nvt_dev *nvt) static void nvt_get_rx_ir_data(struct nvt_dev *nvt)
{ {
u8 fifocount, val; u8 fifocount;
int i; int i;
/* Get count of how many bytes to read from RX FIFO */ /* Get count of how many bytes to read from RX FIFO */
...@@ -800,10 +800,8 @@ static void nvt_get_rx_ir_data(struct nvt_dev *nvt) ...@@ -800,10 +800,8 @@ static void nvt_get_rx_ir_data(struct nvt_dev *nvt)
nvt_dbg("attempting to fetch %u bytes from hw rx fifo", fifocount); nvt_dbg("attempting to fetch %u bytes from hw rx fifo", fifocount);
/* Read fifocount bytes from CIR Sample RX FIFO register */ /* Read fifocount bytes from CIR Sample RX FIFO register */
for (i = 0; i < fifocount; i++) { for (i = 0; i < fifocount; i++)
val = nvt_cir_reg_read(nvt, CIR_SRXFIFO); nvt->buf[i] = nvt_cir_reg_read(nvt, CIR_SRXFIFO);
nvt->buf[i] = val;
}
nvt->pkts = fifocount; nvt->pkts = fifocount;
nvt_dbg("%s: pkts now %d", __func__, nvt->pkts); nvt_dbg("%s: pkts now %d", __func__, nvt->pkts);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment