]> git.sur5r.net Git - u-boot/commitdiff
video: ipu: simplify if else code
authorPeng Fan <Peng.Fan@freescale.com>
Tue, 24 Nov 2015 08:54:23 +0000 (16:54 +0800)
committerStefano Babic <sbabic@denx.de>
Wed, 25 Nov 2015 08:52:18 +0000 (09:52 +0100)
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>
drivers/video/ipu_disp.c

index 4faeafb6351d4d3e75376e704b479ebad4a3c6b3..7a874782285ab92f1e75215c6aeee64cafb77ac2 100644 (file)
@@ -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;