Commit 7ac7b023 authored by Heiner Kallweit's avatar Heiner Kallweit Committed by Mauro Carvalho Chehab

[media] media: rc: nuvoton: simplify a few functions

Simplify a few functions.
Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent cb359a86
...@@ -139,11 +139,7 @@ static inline void nvt_cir_reg_write(struct nvt_dev *nvt, u8 val, u8 offset) ...@@ -139,11 +139,7 @@ static inline void nvt_cir_reg_write(struct nvt_dev *nvt, u8 val, u8 offset)
/* read val from cir config register */ /* read val from cir config register */
static u8 nvt_cir_reg_read(struct nvt_dev *nvt, u8 offset) static u8 nvt_cir_reg_read(struct nvt_dev *nvt, u8 offset)
{ {
u8 val; return inb(nvt->cir_addr + offset);
val = inb(nvt->cir_addr + offset);
return val;
} }
/* write val to cir wake register */ /* write val to cir wake register */
...@@ -156,11 +152,7 @@ static inline void nvt_cir_wake_reg_write(struct nvt_dev *nvt, ...@@ -156,11 +152,7 @@ static inline void nvt_cir_wake_reg_write(struct nvt_dev *nvt,
/* read val from cir wake config register */ /* read val from cir wake config register */
static u8 nvt_cir_wake_reg_read(struct nvt_dev *nvt, u8 offset) static u8 nvt_cir_wake_reg_read(struct nvt_dev *nvt, u8 offset)
{ {
u8 val; return inb(nvt->cir_wake_addr + offset);
val = inb(nvt->cir_wake_addr + offset);
return val;
} }
/* don't override io address if one is set already */ /* don't override io address if one is set already */
...@@ -487,9 +479,7 @@ static void nvt_cir_wake_ldev_init(struct nvt_dev *nvt) ...@@ -487,9 +479,7 @@ static void nvt_cir_wake_ldev_init(struct nvt_dev *nvt)
/* clear out the hardware's cir rx fifo */ /* clear out the hardware's cir rx fifo */
static void nvt_clear_cir_fifo(struct nvt_dev *nvt) static void nvt_clear_cir_fifo(struct nvt_dev *nvt)
{ {
u8 val; u8 val = nvt_cir_reg_read(nvt, CIR_FIFOCON);
val = nvt_cir_reg_read(nvt, CIR_FIFOCON);
nvt_cir_reg_write(nvt, val | CIR_FIFOCON_RXFIFOCLR, CIR_FIFOCON); nvt_cir_reg_write(nvt, val | CIR_FIFOCON_RXFIFOCLR, CIR_FIFOCON);
} }
......
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