diff options
author | Heiner Kallweit <hkallweit1@gmail.com> | 2016-08-02 02:45:51 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-09-22 11:37:28 -0300 |
commit | 6db0168821fa4edc3156d36933da0016740a5e03 (patch) | |
tree | 3f45984b5adf6010dd584ee104be314fe0c83ccd /drivers/media | |
parent | a2006ca43266d5e069e9020f8dde2846631db9ea (diff) |
[media] media: rc: nuvoton: simplify nvt_get_rx_ir_data a little
Simplify the code a little.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/rc/nuvoton-cir.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c index fc462f6bd6bd..04fedaa75612 100644 --- a/drivers/media/rc/nuvoton-cir.c +++ b/drivers/media/rc/nuvoton-cir.c @@ -791,7 +791,7 @@ static void nvt_handle_rx_fifo_overrun(struct nvt_dev *nvt) /* copy data from hardware rx fifo into driver buffer */ static void nvt_get_rx_ir_data(struct nvt_dev *nvt) { - u8 fifocount, val; + u8 fifocount; int i; /* 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) nvt_dbg("attempting to fetch %u bytes from hw rx fifo", fifocount); /* Read fifocount bytes from CIR Sample RX FIFO register */ - for (i = 0; i < fifocount; i++) { - val = nvt_cir_reg_read(nvt, CIR_SRXFIFO); - nvt->buf[i] = val; - } + for (i = 0; i < fifocount; i++) + nvt->buf[i] = nvt_cir_reg_read(nvt, CIR_SRXFIFO); nvt->pkts = fifocount; nvt_dbg("%s: pkts now %d", __func__, nvt->pkts); |