Skip to content

Commit e905292

Browse files
Bernard ZhaoChun-Kuang Hu
authored andcommitted
drm/mediatek: Remove unnecessary conversion to bool
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 <[email protected]> Signed-off-by: Chun-Kuang Hu <[email protected]>
1 parent c0b8892 commit e905292

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

drivers/gpu/drm/mediatek/mtk_dsi.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -316,10 +316,7 @@ static void mtk_dsi_lane0_ulp_mode_leave(struct mtk_dsi *dsi)
316316

317317
static bool mtk_dsi_clk_hs_state(struct mtk_dsi *dsi)
318318
{
319-
u32 tmp_reg1;
320-
321-
tmp_reg1 = readl(dsi->regs + DSI_PHY_LCCON);
322-
return ((tmp_reg1 & LC_HS_TX_EN) == 1) ? true : false;
319+
return readl(dsi->regs + DSI_PHY_LCCON) & LC_HS_TX_EN;
323320
}
324321

325322
static void mtk_dsi_clk_hs_mode(struct mtk_dsi *dsi, bool enter)

0 commit comments

Comments
 (0)