Skip to content

Commit f620596

Browse files
committed
bus: ti-sysc: Fix dispc quirk masking bool variables
Fix warning drivers/bus/ti-sysc.c:1806 sysc_quirk_dispc() warn: masking a bool. While at it let's add a comment for what were doing to make the code a bit easier to follow. Fixes: 7324a7a ("bus: ti-sysc: Implement display subsystem reset quirk") Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Closes: https://lore.kernel.org/linux-omap/a8ec8a68-9c2c-4076-bf47-09fccce7659f@kili.mountain/ Signed-off-by: Tony Lindgren <tony@atomide.com>
1 parent ac9a786 commit f620596

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/bus/ti-sysc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1791,7 +1791,7 @@ static u32 sysc_quirk_dispc(struct sysc *ddata, int dispc_offset,
17911791
if (!ddata->module_va)
17921792
return -EIO;
17931793

1794-
/* DISP_CONTROL */
1794+
/* DISP_CONTROL, shut down lcd and digit on disable if enabled */
17951795
val = sysc_read(ddata, dispc_offset + 0x40);
17961796
lcd_en = val & lcd_en_mask;
17971797
digit_en = val & digit_en_mask;
@@ -1803,7 +1803,7 @@ static u32 sysc_quirk_dispc(struct sysc *ddata, int dispc_offset,
18031803
else
18041804
irq_mask |= BIT(2) | BIT(3); /* EVSYNC bits */
18051805
}
1806-
if (disable & (lcd_en | digit_en))
1806+
if (disable && (lcd_en || digit_en))
18071807
sysc_write(ddata, dispc_offset + 0x40,
18081808
val & ~(lcd_en_mask | digit_en_mask));
18091809

0 commit comments

Comments
 (0)