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>
This commit is contained in:
parent
01a8cf9151
commit
cd8f09d9d7
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user