summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorPeng Fan <Peng.Fan@freescale.com>2015-11-24 16:54:23 +0800
committerStefano Babic <sbabic@denx.de>2015-11-25 09:52:18 +0100
commitcd8f09d9d7a856bc47d09c3efa758e58e443ded9 (patch)
tree110d26eb991130f4f3464196c0ea93895ccb3b76 /drivers/video
parent01a8cf91513981d05bf89840d768e9c060ee998b (diff)
video: ipu: simplify if else code
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@freescale.com> Cc: Anatolij Gustschin <agust@denx.de> Cc: Stefano Babic <sbabic@denx.de> Reviewed-by: Stefano Babic <sbabic@denx.de>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/ipu_disp.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/video/ipu_disp.c b/drivers/video/ipu_disp.c
index 4faeafb6351..7a874782285 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;