]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/mediatek: Remove unnecessary conversion to bool
authorBernard Zhao <bernard@vivo.com>
Tue, 16 Jun 2020 06:51:01 +0000 (14:51 +0800)
committerChun-Kuang Hu <chunkuang.hu@kernel.org>
Sat, 4 Jul 2020 22:03:09 +0000 (06:03 +0800)
In function mtk_dsi_clk_hs_state, remove unnecessary conversion
to bool return, this change is to make the code a bit readable.

Signed-off-by: Bernard Zhao <bernard@vivo.com>
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
drivers/gpu/drm/mediatek/mtk_dsi.c

index 270bf22c98feb06248672d0d89de28d2a7419c48..02ac55c13a80bbcf84d8488d93842660bb3d67ec 100644 (file)
@@ -316,10 +316,7 @@ static void mtk_dsi_lane0_ulp_mode_leave(struct mtk_dsi *dsi)
 
 static bool mtk_dsi_clk_hs_state(struct mtk_dsi *dsi)
 {
-       u32 tmp_reg1;
-
-       tmp_reg1 = readl(dsi->regs + DSI_PHY_LCCON);
-       return ((tmp_reg1 & LC_HS_TX_EN) == 1) ? true : false;
+       return readl(dsi->regs + DSI_PHY_LCCON) & LC_HS_TX_EN;
 }
 
 static void mtk_dsi_clk_hs_mode(struct mtk_dsi *dsi, bool enter)