From: Peng Fan Date: Tue, 24 Nov 2015 08:54:23 +0000 (+0800) Subject: video: ipu: simplify if else code X-Git-Tag: v2016.01-rc2~42^2~4 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=cd8f09d9d7a856bc47d09c3efa758e58e443ded9;p=u-boot 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 Cc: Anatolij Gustschin Cc: Stefano Babic Reviewed-by: Stefano Babic --- diff --git a/drivers/video/ipu_disp.c b/drivers/video/ipu_disp.c index 4faeafb635..7a87478228 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;