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>
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;