[U-Boot] [PATCH] video: ipu: simplify if else code
Peng Fan
Peng.Fan at freescale.com
Tue Nov 24 09:54:23 CET 2015
Simplify if/else code, since if channel equals to MEM_BG_SYNC or
MEM_FG_SYNC, we have value 5 for 'dc_chan'.
Signed-off-by: Peng Fan <Peng.Fan at freescale.com>
Cc: Anatolij Gustschin <agust at denx.de>
Cc: Stefano Babic <sbabic at denx.de>
---
drivers/video/ipu_disp.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/video/ipu_disp.c b/drivers/video/ipu_disp.c
index 4faeafb..7a87478 100644
--- a/drivers/video/ipu_disp.c
+++ b/drivers/video/ipu_disp.c
@@ -611,11 +611,9 @@ void ipu_dp_dc_enable(ipu_channel_t channel)
uint32_t reg;
uint32_t dc_chan;
- if (channel == MEM_FG_SYNC)
- dc_chan = 5;
if (channel == MEM_DC_SYNC)
dc_chan = 1;
- else if (channel == MEM_BG_SYNC)
+ else if ((channel == MEM_BG_SYNC) || (channel == MEM_FG_SYNC))
dc_chan = 5;
else
return;
--
2.6.2
More information about the U-Boot
mailing list