OMAPDSS: DISPC: Remove boolean comparisons
authorLuis de Bethencourt <luisbg@osg.samsung.com>
Thu, 15 Oct 2015 12:29:38 +0000 (13:29 +0100)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Tue, 29 Dec 2015 09:06:30 +0000 (11:06 +0200)
Boolean tests do not need explicit comparison to true or false.

Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/video/fbdev/omap2/dss/dispc-compat.c
drivers/video/fbdev/omap2/dss/dispc.c
drivers/video/fbdev/omap2/dss/manager.c

index 633c461fbc6eb52323f124faa7846393c175641d..0918b3bfe82a85bd1b29009ec4a38e6fd5c0144f 100644 (file)
@@ -476,7 +476,7 @@ static void dispc_mgr_disable_lcd_out(enum omap_channel channel)
        int r;
        u32 irq;
 
-       if (dispc_mgr_is_enabled(channel) == false)
+       if (!dispc_mgr_is_enabled(channel))
                return;
 
        /*
@@ -524,7 +524,7 @@ static void dispc_mgr_enable_digit_out(void)
        int r;
        u32 irq_mask;
 
-       if (dispc_mgr_is_enabled(OMAP_DSS_CHANNEL_DIGIT) == true)
+       if (dispc_mgr_is_enabled(OMAP_DSS_CHANNEL_DIGIT))
                return;
 
        /*
@@ -562,7 +562,7 @@ static void dispc_mgr_disable_digit_out(void)
        u32 irq_mask;
        int num_irqs;
 
-       if (dispc_mgr_is_enabled(OMAP_DSS_CHANNEL_DIGIT) == false)
+       if (!dispc_mgr_is_enabled(OMAP_DSS_CHANNEL_DIGIT))
                return;
 
        /*
index 346822b5594724ae083b7f0bad377b4594797442..6b50476ec669c3c03d5806711933475fd999021d 100644 (file)
@@ -581,7 +581,7 @@ EXPORT_SYMBOL(dispc_mgr_go_busy);
 
 void dispc_mgr_go(enum omap_channel channel)
 {
-       WARN_ON(dispc_mgr_is_enabled(channel) == false);
+       WARN_ON(!dispc_mgr_is_enabled(channel));
        WARN_ON(dispc_mgr_go_busy(channel));
 
        DSSDBG("GO %s\n", mgr_desc[channel].name);
@@ -3285,7 +3285,7 @@ void dispc_mgr_set_timings(enum omap_channel channel,
 
                DSSDBG("hsync %luHz, vsync %luHz\n", ht, vt);
        } else {
-               if (t.interlace == true)
+               if (t.interlace)
                        t.y_res /= 2;
        }
 
@@ -3302,7 +3302,7 @@ static void dispc_mgr_set_lcd_divisor(enum omap_channel channel, u16 lck_div,
        dispc_write_reg(DISPC_DIVISORo(channel),
                        FLD_VAL(lck_div, 23, 16) | FLD_VAL(pck_div, 7, 0));
 
-       if (dss_has_feature(FEAT_CORE_CLK_DIV) == false &&
+       if (!dss_has_feature(FEAT_CORE_CLK_DIV) &&
                        channel == OMAP_DSS_CHANNEL_LCD)
                dispc.core_clk_rate = dispc_fclk_rate() / lck_div;
 }
index 1aac9b4191a9762e7556dcb2485c178fa0ff17d2..08a67f4f6a20e2599d3039f63ccf4681ad8bf5c6 100644 (file)
@@ -210,7 +210,7 @@ static int dss_mgr_check_lcd_config(struct omap_overlay_manager *mgr,
                return -EINVAL;
 
        /* fifohandcheck should be used only with stallmode */
-       if (stallmode == false && fifohandcheck == true)
+       if (!stallmode && fifohandcheck)
                return -EINVAL;
 
        /*